From 288693fab59099e6d6539b52ec37e6331e1069d0 Mon Sep 17 00:00:00 2001 From: Miikka Vaisala Date: Fri, 20 Nov 2020 16:31:13 +0800 Subject: [PATCH] Flexible boundary conditions called from simulation.cc --- samples/standalone/simulation.cc | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/samples/standalone/simulation.cc b/samples/standalone/simulation.cc index 0bf193e..1aa5bf2 100644 --- a/samples/standalone/simulation.cc +++ b/samples/standalone/simulation.cc @@ -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;