aboutsummaryrefslogtreecommitdiff
path: root/src/Write2D.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/Write2D.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/Write2D.c')
-rw-r--r--src/Write2D.c8
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);