diff options
author | eschnett <> | 2001-03-13 12:06:00 +0000 |
---|---|---|
committer | eschnett <> | 2001-03-13 12:06:00 +0000 |
commit | f82185918667922d15bd0b2c019ce71b1a530a63 (patch) | |
tree | 612419f07b5a84b75491c9310fb881ccbd25aec8 /Carpet/CarpetIOASCII/src | |
parent | e53cc92a0bf2ac20dceb13da423382fef636a3aa (diff) |
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
Diffstat (limited to 'Carpet/CarpetIOASCII/src')
-rw-r--r-- | Carpet/CarpetIOASCII/src/ioascii.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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 <cassert> #include <cstdio> @@ -507,7 +507,7 @@ int IOASCII<outdim>::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<npoints); |