aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrideout <rideout@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2002-06-20 18:58:00 +0000
committerrideout <rideout@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2002-06-20 18:58:00 +0000
commit0c0ff5cfb5774e10abf891ad3ea9e3ecbf09a98f (patch)
tree2f96ff882774addc825e6dc62992803fd35e8af5
parent24b5d574a0dbbc77ab3dba4374819293e37eb475 (diff)
Corrected to properly handle staggered grids.
This may have to be modified when the new coordinate infrastructure is working properly. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOASCII/trunk@128 94b1c47f-dcfd-45ef-a468-0854c0e9e350
-rw-r--r--src/Write1D.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Write1D.c b/src/Write1D.c
index c7876ea..46cb6b9 100644
--- a/src/Write1D.c
+++ b/src/Write1D.c
@@ -317,6 +317,12 @@ fprintf (stderr, "%d/%d\n", origin[dir], extent);
"IOASCII_Write1D: failed to get physical coordinate ranges "
"for variable '%s'", fullname);
}
+#else
+ /* correct extent in the case of staggered grids */
+ if (CCTK_StaggerDirIndex(dir,gdata.stagtype)==1)
+ {
+ --extent;
+ }
#endif
}
else /* origin for CCTK_ARRAYS is always (0, 0, 0) */
@@ -324,6 +330,8 @@ fprintf (stderr, "%d/%d\n", origin[dir], extent);
memset (origin, 0, gdata.dim * sizeof (CCTK_INT));
}
+
+
mapping = Hyperslab_DefineGlobalMappingByIndex (GH, vindex, 1,
direction,
origin,