From 11305ebb85f311fad4b145e312ed18d6d7fbb9cc Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Tue, 14 Sep 2010 15:54:08 -0500 Subject: CarpetLib: Don't require aligned bboxes for the "contains" function --- Carpet/CarpetLib/src/bbox.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Carpet') 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::size_type bbox::size () const { // Containment template bool bbox::contains (const vect& x) const { + if (empty()) return false; + // no alignment check return all(x>=lower() and x<=upper()); } -- cgit v1.2.3