diff options
author | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2001-04-22 16:00:42 +0000 |
---|---|---|
committer | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2001-04-22 16:00:42 +0000 |
commit | 865c6119880db372582f9919220d3f017c555697 (patch) | |
tree | 541d7da02c2f41cd5e18ec34991edcab7ab2cc98 /src/DumpUtils.c | |
parent | 71afa308fae480c36c82e0261eb2d69d6fd31877 (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/IOHDF5Util/trunk@28 7842ec3a-9562-4be5-9c5b-06ba18f2b668
Diffstat (limited to 'src/DumpUtils.c')
-rw-r--r-- | src/DumpUtils.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/DumpUtils.c b/src/DumpUtils.c index 8c1a052..947f17a 100644 --- a/src/DumpUtils.c +++ b/src/DumpUtils.c @@ -156,19 +156,16 @@ int IOHDF5Util_DumpGH (cGH *GH, CCTK_VInfo (CCTK_THORNSTRING, " %s", CCTK_VarName (vindex)); } - /* get the current timelevel */ - current_timelevel = CCTK_NumTimeLevelsFromVarI (vindex) - 1; - if (current_timelevel > 0) - { - current_timelevel--; - } - request.sdim = request.vdim = CCTK_GroupDimFromVarI (vindex); - /* now dump all timelevels up to the current */ - for (timelevel = 0; timelevel <= current_timelevel; timelevel++) + /* 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) { - IOHDF5Util_DumpVar (GH, vindex, timelevel, &request, file, 0); + IOHDF5Util_DumpVar (GH, vindex, timelevel++, &request, file, 0); } } /* end of loop over all variables */ |