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 | |
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
-rw-r--r-- | schedule.ccl | 34 | ||||
-rw-r--r-- | src/OldBdry.c | 26 | ||||
-rw-r--r-- | src/make.code.defn | 1 |
3 files changed, 44 insertions, 17 deletions
diff --git a/schedule.ccl b/schedule.ccl index b54905c..62956a1 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -637,23 +637,23 @@ schedule GROUP MoL_PostStep AT PostRestrict ### Yosef Zlochower. ### ############################################################ -# schedule GROUP MoL_OldBdry_Wrap IN MoL_PostStep -# { -# } "Wrapper group, do not schedule directly into this group" -# -# schedule GROUP MoL_OldStyleBoundaries in MoL_OldBdry_Wrap -# { -# } "Place old style boundary routines here" -# -# schedule MoL_OldBdry_SetDt IN MoL_OldBdry_Wrap BEFORE MoL_OldStyleBoundaries -# { -# LANGUAGE: C -# } "Store and change dt" -# -# schedule MoL_OldBdry_ResetDt IN MoL_OldBdry_Wrap AFTER MoL_OldStyleBoundaries -# { -# LANGUAGE: C -# } "Reset dt" +schedule GROUP MoL_OldBdry_Wrap IN MoL_PostStep +{ +} "Wrapper group, do not schedule directly into this group" + +schedule GROUP MoL_OldStyleBoundaries in MoL_OldBdry_Wrap +{ +} "Place old style boundary routines here" + +schedule MoL_OldBdry_SetDt IN MoL_OldBdry_Wrap BEFORE MoL_OldStyleBoundaries +{ + LANGUAGE: C +} "Store and change dt" + +schedule MoL_OldBdry_ResetDt IN MoL_OldBdry_Wrap AFTER MoL_OldStyleBoundaries +{ + LANGUAGE: C +} "Reset dt" ################################################# ### Final internal MoL stuff; decrement the ### 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 \ |