aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/CarpetLib')
-rw-r--r--Carpet/CarpetLib/src/bbox.cc6
-rw-r--r--Carpet/CarpetLib/src/bbox.hh4
2 files changed, 9 insertions, 1 deletions
diff --git a/Carpet/CarpetLib/src/bbox.cc b/Carpet/CarpetLib/src/bbox.cc
index a0041edae..1e68b8d17 100644
--- a/Carpet/CarpetLib/src/bbox.cc
+++ b/Carpet/CarpetLib/src/bbox.cc
@@ -51,6 +51,12 @@ bbox<T,D> bbox<T,D>::poison ()
return bbox (v, v, v);
}
+template<typename T, int D>
+bool bbox<T,D>::is_poison () const
+{
+ return D > 0 and equal_to<bbox> () (*this, poison());
+}
+
// Accessors
diff --git a/Carpet/CarpetLib/src/bbox.hh b/Carpet/CarpetLib/src/bbox.hh
index 82464aea9..d65928e02 100644
--- a/Carpet/CarpetLib/src/bbox.hh
+++ b/Carpet/CarpetLib/src/bbox.hh
@@ -84,7 +84,9 @@ public:
}
// Poison
- static bbox poison () CCTK_MEMBER_ATTRIBUTE_PURE;
+ static bbox poison () CCTK_ATTRIBUTE_PURE;
+
+ bool is_poison () const CCTK_MEMBER_ATTRIBUTE_PURE;
// Accessors
// (Don't return references; *this might be a temporary)