aboutsummaryrefslogtreecommitdiff
path: root/src/SetTime.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/SetTime.c')
-rw-r--r--src/SetTime.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/SetTime.c b/src/SetTime.c
index 3e9ae3f..5149eb2 100644
--- a/src/SetTime.c
+++ b/src/SetTime.c
@@ -247,6 +247,22 @@ int MoL_ResetTime(CCTK_ARGUMENTS)
0.5*(*Original_Delta_Time)/cctkGH->cctk_timefac;
}
}
+ else if (CCTK_EQUALS(ODE_Method,"RK4"))
+ {
+ const int substep = MoL_Intermediate_Steps - (* MoL_Intermediate_Step);
+
+ CCTK_REAL dt = (*Original_Delta_Time)/cctkGH->cctk_timefac;
+ switch (substep)
+ {
+ case 1:
+ case 2:
+ dt *= 0.5;
+ break;
+ default:
+ dt = 0;
+ }
+ cctkGH->cctk_time = (*Original_Time) - dt;
+ }
else if (CCTK_EQUALS(ODE_Method,"RK45") || CCTK_EQUALS(ODE_Method,"RK45CK"))
{
const int substep = MoL_Intermediate_Steps - (* MoL_Intermediate_Step);