diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/OldBdry.c | 26 | ||||
-rw-r--r-- | src/make.code.defn | 1 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/OldBdry.c b/src/OldBdry.c new file mode 100644 index 0000000..f4b5751 --- /dev/null +++ b/src/OldBdry.c @@ -0,0 +1,26 @@ +#include "cctk.h" +#include "cctk_Arguments.h" + +static CCTK_REAL mol_dt; + + +void MoL_OldBdry_SetDt (CCTK_ARGUMENTS) +{ + DECLARE_CCTK_ARGUMENTS + + CCTK_REAL dt; + CCTK_REAL old_time; + + old_time = *Original_Time - *Original_Delta_Time / cctkGH->cctk_timefac; + + mol_dt = cctkGH->cctk_delta_time; + + dt = cctkGH->cctk_time - old_time; + + cctkGH->cctk_delta_time = dt * cctkGH->cctk_timefac; +} + +void MoL_OldBdry_ResetDt (CCTK_ARGUMENTS) +{ + cctkGH->cctk_delta_time = mol_dt; +} diff --git a/src/make.code.defn b/src/make.code.defn index 926dbbb..b2717f9 100644 --- a/src/make.code.defn +++ b/src/make.code.defn @@ -8,6 +8,7 @@ SRCS = ChangeType.c \ ICN.c \ IndexArrays.c \ InitialCopy.c \ + OldBdry.c \ ParamCheck.c \ RK2.c \ RK3.c \ |