diff options
-rw-r--r-- | param.ccl | 4 | ||||
-rw-r--r-- | schedule.ccl | 12 | ||||
-rw-r--r-- | src/InitialCopy.c | 37 |
3 files changed, 45 insertions, 8 deletions
@@ -106,3 +106,7 @@ CCTK_REAL MoL_Tiny "Effective local machine zero; required by generic solvers" { 0:* :: "Defaults to 1.e-15" } 1.e-15 + +BOOLEAN initial_data_is_crap "If the initial data routine fails to set up the previous time levels, copy the current backwards" +{ +} "no" diff --git a/schedule.ccl b/schedule.ccl index 6f552b4..9de0d8f 100644 --- a/schedule.ccl +++ b/schedule.ccl @@ -111,10 +111,18 @@ schedule GROUP MoL_Register AT Post_Recover_Variables LANG:C } "The group where physics thorns register variables with MoL" -schedule MoL_FillAllLevels AT PostInitial AFTER MoL_Register +if (initial_data_is_crap) +{ + schedule MoL_FillAllLevels AT PostInitial AFTER MoL_Register + { + LANG:C + } "A bad routine. Fills all previous timelevels with data copied from the current." +} + +schedule MoL_ReportNumberVariables AT PostInitial AFTER MoL_Register { LANG:C -} "A bad routine. Fills all previous timelevels with data copied from the current." +} "Report how many of each type of variable there are" ###################################################### ### The evolution step. This is almost a self ### diff --git a/src/InitialCopy.c b/src/InitialCopy.c index 6388550..1980d5f 100644 --- a/src/InitialCopy.c +++ b/src/InitialCopy.c @@ -39,6 +39,8 @@ void MoL_InitialCopy(CCTK_ARGUMENTS); void MoL_FillAllLevels(CCTK_ARGUMENTS); +void MoL_ReportNumberVariables(CCTK_ARGUMENTS); + /******************************************************************** ********************* Other Routine Prototypes ********************* ********************************************************************/ @@ -54,8 +56,8 @@ void MoL_FillAllLevels(CCTK_ARGUMENTS); void MoL_InitialCopy(CCTK_ARGUMENTS) { - DECLARE_CCTK_ARGUMENTS - DECLARE_CCTK_PARAMETERS + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; cGroupDynamicData arraydata; CCTK_INT groupindex, ierr; @@ -393,8 +395,6 @@ void MoL_InitialCopy(CCTK_ARGUMENTS) it is really necessary. It fills the previous timelevels by copying the data from the current timelevels, which should have been set up during the CCTK_INITIAL timebin. - It also prints some useful information about the number of - registered functions. @enddesc @calls @calledby @@ -407,8 +407,8 @@ void MoL_InitialCopy(CCTK_ARGUMENTS) void MoL_FillAllLevels(CCTK_ARGUMENTS) { - DECLARE_CCTK_ARGUMENTS - DECLARE_CCTK_PARAMETERS + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; CCTK_INT var, level; CCTK_INT totalsize; @@ -467,6 +467,31 @@ void MoL_FillAllLevels(CCTK_ARGUMENTS) } } + return; +} + + /*@@ + @routine MoL_ReportNumberVariables + @date Thu Jul 17 18:35:54 2003 + @author Ian Hawke + @desc + Prints some useful information about the number of + registered functions. + @enddesc + @calls + @calledby + @history + + @endhistory + +@@*/ + +void MoL_ReportNumberVariables(CCTK_ARGUMENTS) +{ + + DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; + CCTK_VInfo(CCTK_THORNSTRING, "The maximum number of evolved variables is %d. %d are registered.", MoL_Num_Evolved_Vars,MoLNumEvolvedVariables); |