diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2010-09-14 15:54:08 -0500 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 18:25:22 +0000 |
commit | 11305ebb85f311fad4b145e312ed18d6d7fbb9cc (patch) | |
tree | 9c5c1c0da7fc34c894f22b3134ed7e5037c50870 /Carpet | |
parent | 2ecbcc432b62c4caedfa50c07a486dd6880a7d34 (diff) |
CarpetLib: Don't require aligned bboxes for the "contains" function
Diffstat (limited to 'Carpet')
-rw-r--r-- | Carpet/CarpetLib/src/bbox.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Carpet/CarpetLib/src/bbox.cc b/Carpet/CarpetLib/src/bbox.cc index c5a429d5e..a382b0c67 100644 --- a/Carpet/CarpetLib/src/bbox.cc +++ b/Carpet/CarpetLib/src/bbox.cc @@ -80,6 +80,8 @@ typename bbox<T,D>::size_type bbox<T,D>::size () const { // Containment template<typename T, int D> bool bbox<T,D>::contains (const vect<T,D>& x) const { + if (empty()) return false; + // no alignment check return all(x>=lower() and x<=upper()); } |