diff options
Diffstat (limited to 'src/Write2D.c')
-rw-r--r-- | src/Write2D.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Write2D.c b/src/Write2D.c index 4c7db4d..5ddb038 100644 --- a/src/Write2D.c +++ b/src/Write2D.c @@ -142,7 +142,8 @@ int IOASCII_Write2D (const cGH *GH, int vindex, const char *alias) char *fullname, *groupname; int extent_int[3]; CCTK_REAL offset[2]; - CCTK_INT vindices[3], origin[3], extent[2], direction[6], hsize[2]; + CCTK_INT vindices[3], origin[3], extent[2], direction[6], downsample[2], + hsize[2]; void *hdata[3]; FILE **fileset; DECLARE_CCTK_PARAMETERS @@ -248,14 +249,17 @@ int IOASCII_Write2D (const cGH *GH, int vindex, const char *alias) if (dir == 0) { dir_i = 0; dir_j = 1; /* xy */ + downsample[0] = out_downsample_x; downsample[1] = out_downsample_y; } else if (dir == 1) { dir_i = 0; dir_j = 2; /* xz */ + downsample[0] = out_downsample_x; downsample[1] = out_downsample_z; } else { dir_i = 1; dir_j = 2; /* yz */ + downsample[0] = out_downsample_y; downsample[1] = out_downsample_z; } /* set the extent vector */ @@ -275,7 +279,7 @@ int IOASCII_Write2D (const cGH *GH, int vindex, const char *alias) mapping = Hyperslab_GlobalMappingByIndex (GH, vindex, 2, direction, origin, extent, - NULL, /* downsample */ + downsample, -1, /* table handle */ NULL /* conversion fn */, hsize); |