diff options
-rw-r--r-- | doc/UsersGuide/Appendices.tex | 8 | ||||
-rw-r--r-- | doc/UsersGuide/ApplicationThorns.tex | 9 | ||||
-rw-r--r-- | lib/sbin/CreateScheduleBindings.pl | 8 |
3 files changed, 17 insertions, 8 deletions
diff --git a/doc/UsersGuide/Appendices.tex b/doc/UsersGuide/Appendices.tex index 9520fdd8..d61264fe 100644 --- a/doc/UsersGuide/Appendices.tex +++ b/doc/UsersGuide/Appendices.tex @@ -840,7 +840,9 @@ file. If the maximum number of timelevels is 1 (the default), this number may be omitted. Alternatively \var{timelevels} can be the name of a parameter accessible to the thorn. The parameter name is the same as used in C routines of the thorn, fully qualified parameter names of the form -\texttt{\var{thorn}::\var{parameter}} are not allowed. +\texttt{\var{thorn}::\var{parameter}} are not allowed. In this case 0 (zero) +\var{timelevels} can be requested, which is equivalent to the {\tt STORAGE} +statement being absent. The behaviour of an assignment statement is independent of its position in the schedule file (so long as it is outside a schedule @@ -919,7 +921,9 @@ schedule [GROUP] <\var{function name}|\var{group name}> AT|IN <\var{time}> \verb this number may be omitted. Alternatively \var{timelevels} can be the name of a parameter accessible to the thorn. The parameter name is the same as used in C routines of the thorn, fully qualified parameter names - of the form \texttt{\var{thorn}::\var{parameter}} are not allowed. + of the form \texttt{\var{thorn}::\var{parameter}} are not allowed. In this + case 0 (zero) \var{timelevels} can be requested, which is equivalent to + the {\tt STORAGE} statement being absent. \item[{\tt TRIGGER}] List of grid variables or groups to be used as triggers for causing an {\tt ANALYSIS} function or group to be diff --git a/doc/UsersGuide/ApplicationThorns.tex b/doc/UsersGuide/ApplicationThorns.tex index 496ea2cb..e2a8e027 100644 --- a/doc/UsersGuide/ApplicationThorns.tex +++ b/doc/UsersGuide/ApplicationThorns.tex @@ -523,7 +523,9 @@ the number of timelevels of each group for which storage should be activated. Alternatively \var{timelevels} can be the name of a parameter accessible to the thorn. The parameter name is the same as used in C routines of the thorn, fully qualified parameter names of the form -\texttt{\var{thorn}::\var{parameter}} are not allowed. +\texttt{\var{thorn}::\var{parameter}} are not allowed. In this case 0 (zero) +\var{timelevels} can be requested, which is equivalent to the {\tt STORAGE} +statement being absent. \item[\texttt{TRIGGERS}] \texttt{TRIGGERS} is used when the routine is registered at \texttt{ANALYSIS}. This is a special time bin; a routine @@ -1504,7 +1506,10 @@ defining {\tt interface.ccl} file. If the maximum is 1 (the default) this number may be omitted. Alternatively \var{timelevels} can be the name of a parameter accessible to the thorn. The parameter name is the same as used in C routines of the thorn, fully qualified parameter names -of the form \texttt{\var{thorn}::\var{parameter}} are not allowed. +of the form \texttt{\var{thorn}::\var{parameter}} are not allowed. In this +case 0 (zero) \var{timelevels} can be requested, which is equivalent to +the {\tt STORAGE} statement being absent. + \item[\texttt{TRIGGER}] This is only used for items scheduled at timebin \texttt{CCTK\_ANALYSIS}. The item will only be executed if output is due for at least one diff --git a/lib/sbin/CreateScheduleBindings.pl b/lib/sbin/CreateScheduleBindings.pl index b2b1f7c4..045b5d7a 100644 --- a/lib/sbin/CreateScheduleBindings.pl +++ b/lib/sbin/CreateScheduleBindings.pl @@ -569,10 +569,10 @@ sub ScheduleBlock # add check on number of timelevels in case we were using a parameter for($i=0; $i < @$tlist; $i++) { - $buffer .= " if(!($$tlist[$i] > 0 && $$tlist[$i] <= CCTK_MaxTimeLevels(\"$$mem_groups[$i]\")))\n"; + $buffer .= " if(!($$tlist[$i] >= 0 && $$tlist[$i] <= CCTK_MaxTimeLevels(\"$$mem_groups[$i]\")))\n"; $buffer .= " CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING,\n"; $buffer .= " \"Tried to schedule %d timelevels for group '%s' in schedule.ccl.\\n\"\n"; - $buffer .= " \"Value must be between 1 and %d (inclusive)\",\n"; + $buffer .= " \"Value must be between 0 and %d (inclusive)\",\n"; $buffer .= " $$tlist[$i], \"$$mem_groups[$i]\", CCTK_MaxTimeLevels(\"$$mem_groups[$i]\"));\n"; $buffer .= "\n"; } @@ -703,10 +703,10 @@ sub ScheduleStatement # add check on number of timelevels in case we were using a parameter for($i=0; $i < @$groups; $i++) { - $buffer .= " if(!($$misc[$i] > 0 && $$misc[$i] <= CCTK_MaxTimeLevels(\"$$groups[$i]\")))\n"; + $buffer .= " if(!($$misc[$i] >= 0 && $$misc[$i] <= CCTK_MaxTimeLevels(\"$$groups[$i]\")))\n"; $buffer .= " CCTK_VWarn(0, __LINE__, __FILE__, CCTK_THORNSTRING,\n"; $buffer .= " \"Tried to schedule %d timelevels for group '%s' in schedule.ccl.\\n\"\n"; - $buffer .= " \"Value must be between 1 and %d (inclusive)\",\n"; + $buffer .= " \"Value must be between 0 and %d (inclusive)\",\n"; $buffer .= " $$misc[$i], \"$$groups[$i]\", CCTK_MaxTimeLevels(\"$$groups[$i]\"));\n"; $buffer .= "\n"; } |