aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2003-07-17 16:39:44 +0000
committerhawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b>2003-07-17 16:39:44 +0000
commit89eb83f9c9987c19dbf9c5080d3ae4b89bc3ddbe (patch)
treee4e53916fd22155ae4886e72607bebb498a5efd1
parent914ca2b871604f516dfa76b12179c7a3c464e1c1 (diff)
Optionally don't fill all timelevels after initial data is computed (changes the default but should have no effect).
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@23 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
-rw-r--r--param.ccl4
-rw-r--r--schedule.ccl12
-rw-r--r--src/InitialCopy.c37
3 files changed, 45 insertions, 8 deletions
diff --git a/param.ccl b/param.ccl
index 770df21..8fca2fc 100644
--- a/param.ccl
+++ b/param.ccl
@@ -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);