diff options
author | hawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2006-07-28 09:45:36 +0000 |
---|---|---|
committer | hawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2006-07-28 09:45:36 +0000 |
commit | ec098f5dadd15c70908dcbd07b484f04f926ebea (patch) | |
tree | e76737a0c878e3b706fac43ff99237b561c86676 /src | |
parent | eeb8bdf88f9b3de750e95bdb98ae78a8f9b4ad49 (diff) |
"Old boundary" interface, as provided by Yosef Zlochower.
This sets CCTK_DELTA_TIME in a different way to the standard MoL
method inside a bin in MoL_PostStep. I believe this is designed for
use with the standard Cactus Radiative boundary condition.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@114 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
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 \ |