diff options
author | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2001-09-21 11:31:09 +0000 |
---|---|---|
committer | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2001-09-21 11:31:09 +0000 |
commit | ce402fb886c3764cb3594fbf1272bab7070de89e (patch) | |
tree | 508d90008e3a8a8c5fdd41f4094cacbb53c98900 /src/DumpUtils.c | |
parent | 3f507b050629528b23235ac9c3077185c4b14c57 (diff) |
Bugfix for checkpointing grid arrays of dimension other than CCTK_MaxDim().
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@43 7842ec3a-9562-4be5-9c5b-06ba18f2b668
Diffstat (limited to 'src/DumpUtils.c')
-rw-r--r-- | src/DumpUtils.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/DumpUtils.c b/src/DumpUtils.c index 0cdc89f..3aaa6b2 100644 --- a/src/DumpUtils.c +++ b/src/DumpUtils.c @@ -81,7 +81,6 @@ int IOHDF5Util_DumpGH (cGH *GH, { request.length[vindex] = -1; request.downsample[vindex] = 1; - request.direction[vindex * maxdim + vindex] = 1; } /* disable output in single precision */ @@ -151,8 +150,16 @@ int IOHDF5Util_DumpGH (cGH *GH, last_timelevel--; } request.sdim = request.vdim = gdata.dim; - first_vindex = CCTK_FirstVarIndexI (gindex); + /* set the hyperslab directions (orthogonal to all axes) */ + memset (request.direction, 0, request.sdim * request.vdim); + for (vindex = 0; vindex < request.sdim; vindex++) + { + request.direction[vindex * request.vdim + vindex] = 1; + } + + /* loop over all variables in this group */ + first_vindex = CCTK_FirstVarIndexI (gindex); for (vindex = first_vindex; vindex < first_vindex + gdata.numvars; vindex++) { if (verbose && file >= 0) @@ -160,6 +167,7 @@ int IOHDF5Util_DumpGH (cGH *GH, CCTK_VInfo (CCTK_THORNSTRING, " %s", CCTK_VarName (vindex)); } + /* loop over all timelevels of this variable */ for (timelevel = 0; timelevel < last_timelevel; timelevel++) { IOHDF5Util_DumpVar (GH, vindex, timelevel, &request, file, 0); |