diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2005-11-23 22:39:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2005-11-23 22:39:00 +0000 |
commit | bb1faeb997e2eb1c8c89f3b4ae3397143f4882eb (patch) | |
tree | 3b2ef09f93c2fc3c7e6eab48289c396cf5ce4220 /Carpet/CarpetInterp | |
parent | 7954432ff8f900b778b0ef3cf0257bf066c1f301 (diff) |
CarpetInterp: Allow zero-dimensional interpolation
darcs-hash:20051123223926-dae7b-fc95d6f60c96df35e7848cd31e37132df3492259.gz
Diffstat (limited to 'Carpet/CarpetInterp')
-rw-r--r-- | Carpet/CarpetInterp/src/interp.cc | 6 |
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 |