Flexible boundary conditions called from simulation.cc

This commit is contained in:
Miikka Vaisala
2020-11-20 16:31:13 +08:00
parent 4add619e2f
commit 288693fab5

View File

@@ -367,7 +367,8 @@ run_simulation(const char* config_path)
#endif
}
acBoundcondStep();
//acBoundcondStep();
acBoundcondStepGBC(mesh_info);
acStore(mesh);
if (start_step == 0) {
save_mesh(*mesh, 0, t_step);
@@ -426,7 +427,11 @@ run_simulation(const char* config_path)
loadForcingParamsToDevice(forcing_params);
#endif
acIntegrate(dt);
/* Uses now flexible bokundary conditions */
//acIntegrate(dt);
acIntegrateGBC(mesh_info, dt);
t_step += dt;
@@ -472,7 +477,8 @@ run_simulation(const char* config_path)
acBoundcondStep();
acStore(mesh);
*/
acBoundcondStep();
//acBoundcondStep();
acBoundcondStepGBC(mesh_info);
acStore(mesh);
save_mesh(*mesh, i, t_step);
@@ -493,7 +499,8 @@ run_simulation(const char* config_path)
if (dt < dt_typical/AcReal(1e5)) {
if (dtcounter > 10) {
printf("dt = %e TOO LOW! Ending run at t = %#e \n", double(dt), double(t_step));
acBoundcondStep();
//acBoundcondStep();
acBoundcondStepGBC(mesh_info);
acStore(mesh);
save_mesh(*mesh, i, t_step);
break;
@@ -507,7 +514,8 @@ run_simulation(const char* config_path)
// End loop if nan is found
if (found_nan > 0) {
printf("Found nan at t = %e \n", double(t_step));
acBoundcondStep();
//acBoundcondStep();
acBoundcondStepGBC(mesh_info);
acStore(mesh);
save_mesh(*mesh, i, t_step);
break;
@@ -522,7 +530,8 @@ run_simulation(const char* config_path)
if (found_stop == 1) {
printf("Found STOP file at t = %e \n", double(t_step));
acBoundcondStep();
//acBoundcondStep();
acBoundcondStepGBC(mesh_info);
acStore(mesh);
save_mesh(*mesh, i, t_step);
break;