From f82185918667922d15bd0b2c019ce71b1a530a63 Mon Sep 17 00:00:00 2001 From: eschnett <> Date: Tue, 13 Mar 2001 12:06:00 +0000 Subject: Fixing bugs with octant mode, coordinates, and ASCII output. Fixing bugs with octant mode, coordinates, and ASCII output. Adapting the test suite. darcs-hash:20010313120652-f6438-6411b2838ea80747009724e17197ae2a7aaeb808.gz --- Carpet/CarpetIOASCII/src/ioascii.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Carpet/CarpetIOASCII/src') diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc index b3fcd8dbe..31405e865 100644 --- a/Carpet/CarpetIOASCII/src/ioascii.cc +++ b/Carpet/CarpetIOASCII/src/ioascii.cc @@ -1,4 +1,4 @@ -// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOASCII/src/ioascii.cc,v 1.4 2001/03/12 16:54:25 eschnett Exp $ +// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOASCII/src/ioascii.cc,v 1.5 2001/03/13 13:06:59 eschnett Exp $ #include #include @@ -507,7 +507,7 @@ int IOASCII::CoordToOffset (cGH* cgh, int dir, double coord) const int npoints = cgh->cctk_gsh[dir-1]; - const CCTK_REAL rindex = (coord - lower) / (upper - lower) * npoints; + const CCTK_REAL rindex = (coord - lower) / (upper - lower) * (npoints-1); const int cindex = (int)floor(rindex + 0.5 + 1e-6); assert (cindex>=0 && cindex