diff options
author | schnetter <> | 2003-05-13 10:14:00 +0000 |
---|---|---|
committer | schnetter <> | 2003-05-13 10:14:00 +0000 |
commit | c5e68615d13e2d12779c9d0347fbcc0eebaf4f5e (patch) | |
tree | 94c5bdf91c09dd001992a445229b07e113c690cb /Carpet/CarpetLib/src/bbox.cc | |
parent | 1f8ed8eea75ce7f304d0178968b9461662ef7a32 (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/src/bbox.cc')
-rw-r--r-- | Carpet/CarpetLib/src/bbox.cc | 5 |
1 files changed, 3 insertions, 2 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; |