aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetInterp
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2005-11-23 22:39:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2005-11-23 22:39:00 +0000
commitbb1faeb997e2eb1c8c89f3b4ae3397143f4882eb (patch)
tree3b2ef09f93c2fc3c7e6eab48289c396cf5ce4220 /Carpet/CarpetInterp
parent7954432ff8f900b778b0ef3cf0257bf066c1f301 (diff)
CarpetInterp: Allow zero-dimensional interpolation
darcs-hash:20051123223926-dae7b-fc95d6f60c96df35e7848cd31e37132df3492259.gz
Diffstat (limited to 'Carpet/CarpetInterp')
-rw-r--r--Carpet/CarpetInterp/src/interp.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/Carpet/CarpetInterp/src/interp.cc b/Carpet/CarpetInterp/src/interp.cc
index deb210faa..0c6cee374 100644
--- a/Carpet/CarpetInterp/src/interp.cc
+++ b/Carpet/CarpetInterp/src/interp.cc
@@ -202,7 +202,7 @@ namespace CarpetInterp {
{
cGH const * const cctkGH = static_cast<cGH const *> (cctkGH_);
assert (cctkGH);
- assert (1 <= N_dims and N_dims <= dim);
+ assert (0 <= N_dims and N_dims <= dim);
// Check input arrays
int coord_group = -1;
@@ -397,10 +397,10 @@ namespace CarpetInterp {
senddispl[p] = senddispl[p-1] + sendcnt[p-1];
recvdispl[p] = recvdispl[p-1] + recvcnt[p-1];
}
- assert (N_points_local % N_dims == 0);
+ if (N_dims > 0) assert (N_points_local % N_dims == 0);
// N_points_local is the total number of points to receive
// and thus the total number of points to interpolate on this processor
- N_points_local /= N_dims;
+ if (N_dims > 0) N_points_local /= N_dims;
// Set up the per-component coordinates
// as offset into the single communication send buffer