aboutsummaryrefslogtreecommitdiff
path: root/src/DumpGH.c
diff options
context:
space:
mode:
authortradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2001-04-22 16:01:14 +0000
committertradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2001-04-22 16:01:14 +0000
commitc0596a7e35acfa79c6b53626cd408bb858b3d648 (patch)
tree4b71f00bea8f156f73308e6f53cf66042bdda806 /src/DumpGH.c
parente0434816ab8354125c24d64e798df31d4698da17 (diff)
Checkpoint the current timelevel and all others except the eldest
(in case there's more than just one). git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@185 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/DumpGH.c')
-rw-r--r--src/DumpGH.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/DumpGH.c b/src/DumpGH.c
index 864ec58..f4d7cea 100644
--- a/src/DumpGH.c
+++ b/src/DumpGH.c
@@ -391,12 +391,15 @@ void IOFlexIO_DumpGH (cGH *GH, int called_from)
if (verbose)
CCTK_VInfo (CCTK_THORNSTRING, " %s", CCTK_VarName (vindex));
- /* get the current timelevel */
+ /* get the first and last (= current) timelevel to dump */
current_timelevel = CCTK_NumTimeLevelsFromVarI (vindex) - 1;
+ timelevel = current_timelevel > 0 ? 1 : 0;
- /* now dump all timelevels up to the current */
- for (timelevel = 0; timelevel <= current_timelevel; timelevel++)
- IOFlexIO_DumpVar (GH, vindex, timelevel, iof);
+ /* now dump all timelevels */
+ while (timelevel <= current_timelevel)
+ {
+ IOFlexIO_DumpVar (GH, vindex, timelevel++, iof);
+ }
} /* end of loop over all variables */
/* stop timer for dumping datasets */