aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib
diff options
context:
space:
mode:
authorschnetter <>2003-05-13 10:14:00 +0000
committerschnetter <>2003-05-13 10:14:00 +0000
commitc5e68615d13e2d12779c9d0347fbcc0eebaf4f5e (patch)
tree94c5bdf91c09dd001992a445229b07e113c690cb /Carpet/CarpetLib
parent1f8ed8eea75ce7f304d0178968b9461662ef7a32 (diff)
Handle empty grids.
Handle empty grids. Fix global and level mode handling of the interpolator. Allow local mode calls for the interpolator, reduction operator, and hyperslabber, assuming that people know what they are doing. darcs-hash:20030513101400-07bb3-42af7544c2ea98dbef5a7ad6d5112bea2dcc404f.gz
Diffstat (limited to 'Carpet/CarpetLib')
-rw-r--r--Carpet/CarpetLib/src/bbox.cc5
-rw-r--r--Carpet/CarpetLib/src/dh.cc8
2 files changed, 5 insertions, 8 deletions
diff --git a/Carpet/CarpetLib/src/bbox.cc b/Carpet/CarpetLib/src/bbox.cc
index f208c690d..0e11b9bfc 100644
--- a/Carpet/CarpetLib/src/bbox.cc
+++ b/Carpet/CarpetLib/src/bbox.cc
@@ -1,4 +1,4 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/bbox.cc,v 1.14 2003/03/17 10:24:18 schnetter Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/bbox.cc,v 1.15 2003/05/13 12:14:00 schnetter Exp $
#include <assert.h>
@@ -131,7 +131,8 @@ bool bbox<T,D>::is_aligned_with (const bbox& b) const {
// Expand the bbox a little by multiples of the stride
template<class T, int D>
bbox<T,D> bbox<T,D>::expand (const vect<T,D>& lo, const vect<T,D>& hi) const {
- assert (! empty());
+ // Allow expansion only into directions where the extent is not negative
+ assert (all(lower()<=upper() || (lo==0 && hi==0)));
const vect<T,D> str = stride();
const vect<T,D> lb = lower() - lo * str;
const vect<T,D> ub = upper() + hi * str;
diff --git a/Carpet/CarpetLib/src/dh.cc b/Carpet/CarpetLib/src/dh.cc
index eb5bdd62f..d914b7206 100644
--- a/Carpet/CarpetLib/src/dh.cc
+++ b/Carpet/CarpetLib/src/dh.cc
@@ -1,4 +1,4 @@
-// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/dh.cc,v 1.33 2003/05/08 15:35:49 schnetter Exp $
+// $Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetLib/src/dh.cc,v 1.34 2003/05/13 12:14:00 schnetter Exp $
#include <assert.h>
@@ -76,11 +76,7 @@ void dh<D>::recompose (const int initialise_upto) {
if (h.outer_boundaries[rl][c][d][0]) ldist[d] = 0;
if (h.outer_boundaries[rl][c][d][1]) udist[d] = 0;
}
- if (! intr.empty()) {
- // If a processor has zero grid points, then it gets an
- // empty bbox, i.e. no ghost zones are added
- boxes[rl][c][ml].exterior = intr.expand(ldist, udist);
- }
+ boxes[rl][c][ml].exterior = intr.expand(ldist, udist);
// Boundaries (ghost zones only)
// (interior + boundaries = exterior)