aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668>2001-05-10 22:25:29 +0000
committertradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668>2001-05-10 22:25:29 +0000
commitec2211fdd7401bd581382bba03d7c99f9780629c (patch)
treee9841505c95642304192b5c84b89d3712fdb8f03 /src
parentdc1b22cd66195f5db87f20d0be9c4b5d39628001 (diff)
For multiple timelevels, do not checkpoint the oldest.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@31 7842ec3a-9562-4be5-9c5b-06ba18f2b668
Diffstat (limited to 'src')
-rw-r--r--src/DumpUtils.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/DumpUtils.c b/src/DumpUtils.c
index 0791fb0..d8249d4 100644
--- a/src/DumpUtils.c
+++ b/src/DumpUtils.c
@@ -160,10 +160,14 @@ int IOHDF5Util_DumpGH (cGH *GH,
/* now dump all timelevels, if there is more than one timelevel
we don't dump the oldest */
- for (timelevel = 0; timelevel < CCTK_NumTimeLevelsFromVarI (vindex);
- timelevel++)
+ timelevel = CCTK_NumTimeLevelsFromVarI (vindex) - 1;
+ if (timelevel > 0)
{
- IOHDF5Util_DumpVar (GH, vindex, timelevel, &request, file, 0);
+ timelevel--;
+ }
+ while (timelevel >= 0)
+ {
+ IOHDF5Util_DumpVar (GH, vindex, timelevel--, &request, file, 0);
}
} /* end of loop over all variables */