diff options
Diffstat (limited to 'src/DumpVar.c')
-rw-r--r-- | src/DumpVar.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/DumpVar.c b/src/DumpVar.c index 777c0d5..190787c 100644 --- a/src/DumpVar.c +++ b/src/DumpVar.c @@ -72,6 +72,8 @@ int StreamedHDF5_DumpVar (cGH *GH, int index, int timelevel, hid_t fid) StreamedHDF5GH *myGH; StreamGeo_t geo; int vtype; + + int sdir[3] = {0,0,0}; /* Get the handle for StreamedHDF5 extensions */ @@ -93,8 +95,30 @@ int StreamedHDF5_DumpVar (cGH *GH, int index, int timelevel, hid_t fid) data = NULL; + /* TEMPORARY FIX DUE TO INCONSISTENT DIR SPECIFICATION */ + /* direction vector of 1d line in 3d volume */ + if (geo.sdim==1) { + sdir[0] = (geo.direction[0]==0) ? 1:0; + sdir[1] = (geo.direction[0]==1) ? 1:0; + sdir[2] = (geo.direction[0]==2) ? 1:0; + } + /* norm vector of 2d surface in 3d volume */ + else if (geo.sdim==2) + { + sdir[0] = (geo.direction[1]&&geo.direction[2]) ? 1:0; + sdir[1] = (geo.direction[0]&&geo.direction[2]) ? 1:0; + sdir[2] = (geo.direction[0]&&geo.direction[1]) ? 1:0; + } + /* spanning directions for 3d */ + else if (geo.sdim==3) + { + sdir[0] = geo.direction[0]; + sdir[1] = geo.direction[1]; + sdir[2] = geo.direction[2]; + } + if (Hyperslab_GetHyperslab (GH, 0, index, timelevel, geo.sdim, geo.origin, - geo.direction, geo.length, geo.downs, + sdir, geo.length, geo.downs, &data, hsizes) < 0) { char *fullname = CCTK_FullName (index); |