diff options
Diffstat (limited to 'src/Write1D.c')
-rw-r--r-- | src/Write1D.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Write1D.c b/src/Write1D.c index 8ab3057..d40cb79 100644 --- a/src/Write1D.c +++ b/src/Write1D.c @@ -142,6 +142,7 @@ int IOASCII_Write1D (const cGH *GH, int vindex, const char *alias) FILE *file[8]; CCTK_REAL offset; CCTK_REAL coord_lower[3]; + CCTK_INT downsample[3]; CCTK_INT *origin, *direction; CCTK_INT hsize, extent; CCTK_INT vindices[2]; @@ -263,6 +264,12 @@ int IOASCII_Write1D (const cGH *GH, int vindex, const char *alias) direction = origin + gdata.dim; extent_int = malloc ((gdata.dim + 1) * sizeof (int)); + /* set downsampling vector from I/O parameters */ + downsample[0] = out_downsample_x; + downsample[1] = out_downsample_y; + downsample[2] = out_downsample_z; + downsample[3] = 1; + /* get the variable's extents, compute the extent for 3D-diagonals as the minimum of grid points in each direction */ CCTK_GroupgshVI (GH, gdata.dim, extent_int, vindex); @@ -330,7 +337,7 @@ int IOASCII_Write1D (const cGH *GH, int vindex, const char *alias) mapping = Hyperslab_GlobalMappingByIndex (GH, vindex, 1, direction, origin, &extent, - NULL, /* downsample */ + &downsample[dir], -1, /* table handle */ NULL /* conversion fn */, &hsize); |