Skip to content

Commit

Permalink
Minor changes in odeint Keller-Miksis files
Browse files Browse the repository at this point in the history
  • Loading branch information
plaveczlambert committed Sep 16, 2020
1 parent ce13d2a commit 0e75851
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Keller_Miksis_RK45/CPU_odeint/keller_miksis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class km{

class observer
{
int no;
int no; //id number of ode

public:
observer(int row): no(row) {
Expand All @@ -88,7 +88,7 @@ class observer
}
};
int nums[11] = {256, 768, 1536, 3072, 3840, 5120, 7680, 15360, 30720, 46080, 61440}; // 76800, 92160, 122880, 184320, 307200, 768000, 4147200};
//milliseconds 78032 236444 473084 946772 1184320 1577270 2465706 x 10207031

int main() {
cout << "Begin" << endl;

Expand Down
4 changes: 2 additions & 2 deletions Keller_Miksis_RK45/CPU_odeint/keller_miksis_vcl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int num = 0;
const int vectorSize = 4;
const int arraySize = 2;

std::string file_name = "kellermiksis_vcl_noroot_output.txt";
std::string file_name = "kellermiksis_vcl_output.txt";

typedef Vec4d value_type;
typedef std::array< value_type , arraySize> state_type;
Expand Down Expand Up @@ -166,7 +166,7 @@ class observer


int nums[11] = {256, 768, 1536, 3072, 3840, 5120, 7680, 15360, 30720, 46080, 61440}; // 76800, 92160, 122880, 184320, 307200, 768000, 4147200};
//milliseconds 41633 108161 199804 371821 457157 592988 857944 1633295 3141603

int main() {
cout << "Begin" << endl;

Expand Down
6 changes: 0 additions & 6 deletions Keller_Miksis_RK45/GPU_odeint/keller_miksis_thrust.cu
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <utility>

#include <thrust/device_vector.h>
#include <thrust/reduce.h>
#include <thrust/functional.h>

#include <boost/numeric/odeint.hpp>
Expand Down Expand Up @@ -263,16 +262,12 @@ private:
size_t m_N;
observer_functor obs_fun;
};
int nums[12] = {16, 32, 64, 128, 256, 512, 1024, 1536, 3072, 3840, 5120, 7680};// 15360, 30720, 46080, 61440, 76800, 92160, 122880, 184320, 307200, 768000, 4147200};

int main() {
cout << "Keller-Miksis Thrust started" << endl;

typedef runge_kutta_cash_karp54< state_type , value_type , state_type , value_type > stepper_type;

for(int jj=0; jj < 12;jj++){ //parameter loop

num = nums[jj];
cout << num << endl;
auto t1 = chrono::high_resolution_clock::now();

Expand Down Expand Up @@ -324,6 +319,5 @@ int main() {
cout << "Done" << endl;
cout << "Time (ms):" << std::chrono::duration_cast<std::chrono::milliseconds>(t2 - t1).count() << endl;

} //end of parameter loop
return 0;
}

0 comments on commit 0e75851

Please sign in to comment.