aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668>2001-05-10 22:18:04 +0000
committertradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668>2001-05-10 22:18:04 +0000
commitdc1b22cd66195f5db87f20d0be9c4b5d39628001 (patch)
tree4ca51de11f584a710cf7919ed537a68cfe36f78f
parent0d039bdf3a6b9caa8dfec0a5117dc7fef3ecb955 (diff)
Checkpoint all timelevels from 0 up to NumTimeLevels() - 1.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@30 7842ec3a-9562-4be5-9c5b-06ba18f2b668
-rw-r--r--src/DumpUtils.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/DumpUtils.c b/src/DumpUtils.c
index ad5c2f9..0791fb0 100644
--- a/src/DumpUtils.c
+++ b/src/DumpUtils.c
@@ -60,7 +60,7 @@ int IOHDF5Util_DumpGH (cGH *GH,
DECLARE_CCTK_PARAMETERS
int vindex;
int maxdim;
- int timelevel, current_timelevel;
+ int timelevel;
int old_out_single;
ioGH *ioUtilGH;
const char *thorn;
@@ -158,14 +158,12 @@ int IOHDF5Util_DumpGH (cGH *GH,
request.sdim = request.vdim = CCTK_GroupDimFromVarI (vindex);
- /* get timelevels to dump away */
- current_timelevel = CCTK_NumTimeLevelsFromVarI (vindex) - 1;
- timelevel = current_timelevel > 0 ? 1 : 0;
-
- /* now dump away all timelevels */
- while (timelevel <= current_timelevel)
+ /* 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++)
{
- IOHDF5Util_DumpVar (GH, vindex, timelevel++, &request, file, 0);
+ IOHDF5Util_DumpVar (GH, vindex, timelevel, &request, file, 0);
}
} /* end of loop over all variables */