From 11465264e67bead040686564f4067b85e4de373b Mon Sep 17 00:00:00 2001 From: tradke Date: Wed, 17 Nov 2004 16:46:04 +0000 Subject: Always specify the global hyperslab mapping extents as negative values suggesting the hyperslab thorn to assume the maximum possible extents. git-svn-id: http://svn.cactuscode.org/arrangements/CactusIO/IOJpeg/trunk@111 eff87b29-5268-4891-90a3-a07138403961 --- src/Write.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Write.c b/src/Write.c index dea76a6..4005fd9 100644 --- a/src/Write.c +++ b/src/Write.c @@ -77,8 +77,8 @@ int IOJpeg_Write (const cGH *GH, CCTK_INT vindex, const char *alias) int dir, dir_i, dir_j, maxdir, myproc, groupindex; cGroup gdata; char *fullname; - int extent_int[3]; - CCTK_INT origin[3], extent[2], direction[6], hsize[2]; + CCTK_INT origin[3], direction[6], hsize[2]; + const CCTK_INT extent[2] = {-1, -1}; void *hdata, *outdata; CCTK_REAL min, max; const CCTK_INT htype = CCTK_VARIABLE_REAL; @@ -121,9 +121,6 @@ int IOJpeg_Write (const cGH *GH, CCTK_INT vindex, const char *alias) /* in general: maxdir = gdata.dim * (gdata.dim - 1) / 2; */ maxdir = gdata.dim == 2 ? 1 : 3; - /* get the extents of the variable */ - CCTK_GroupgshVI (GH, 3, extent_int, vindex); - /* now do the actual I/O looping over all directions */ for (dir = 0; dir < maxdir; dir++) { @@ -141,10 +138,6 @@ int IOJpeg_Write (const cGH *GH, CCTK_INT vindex, const char *alias) dir_i = 1; dir_j = 2; /* yz */ } - /* set the extent vector */ - extent[0] = extent_int[dir_i]; - extent[1] = extent_int[dir_j]; - /* set the origin using the slice center from IOUtil */ memset (origin, 0, sizeof (origin)); if (gdata.grouptype == CCTK_GF) -- cgit v1.2.3