aboutsummaryrefslogtreecommitdiff
path: root/src/Write1D.c
diff options
context:
space:
mode:
authortradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2004-06-10 16:40:47 +0000
committertradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2004-06-10 16:40:47 +0000
commit98bc87067e54f21301d12619588c271488edd412 (patch)
treec83c4b2f18fc6af73e7529fb20ac67a524d114d0 /src/Write1D.c
parentf5ed6c2e28e17995f9a69ee24a33ee81ddc44065 (diff)
Implement downsampling for IOASCII output.
Set IO::out_downsample_[xyz] to change to default of no downsampling. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOASCII/trunk@182 94b1c47f-dcfd-45ef-a468-0854c0e9e350
Diffstat (limited to 'src/Write1D.c')
-rw-r--r--src/Write1D.c9
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);