summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoreschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2011-12-12 02:53:50 +0000
committereschnett <eschnett@17b73243-c579-4c4c-a9d2-2d5706c11dac>2011-12-12 02:53:50 +0000
commit35c85a91626352d648e60837e211238d3cc173a4 (patch)
tree04e668806db6914e5aab5a44d150c6e72fcb76e2 /lib
parent09ebaa25d4c4318a4e7d0b4d8b248203202c7b48 (diff)
Allow zero timelevels in STORAGE timelevels
This allows to simply set timelevels=0 to turn off storage without having to put an "if (do_something timelevels > 0)" into schedule.ccl files. It is also the only way to turn off storage inside of a GROUP of SCHEDULE statement based on a condition (other than scheduling the item twice, once with STORAGE, once without). git-svn-id: http://svn.cactuscode.org/flesh/trunk@4774 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rw-r--r--lib/sbin/CreateScheduleBindings.pl8
1 files changed, 4 insertions, 4 deletions
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";
}