diff --git a/openmc/cell.py b/openmc/cell.py index 6de8eadec88..94fac841358 100644 --- a/openmc/cell.py +++ b/openmc/cell.py @@ -343,8 +343,7 @@ def bounding_box(self): if self.region is not None: return self.region.bounding_box else: - return BoundingBox(np.array([-np.inf, -np.inf, -np.inf]), - np.array([np.inf, np.inf, np.inf])) + return BoundingBox.infinite() @property def num_instances(self): diff --git a/openmc/region.py b/openmc/region.py index d3c03b89837..f679129c1fc 100644 --- a/openmc/region.py +++ b/openmc/region.py @@ -18,6 +18,11 @@ class Region(ABC): respective classes are typically not instantiated directly but rather are created through operators of the Surface and Region classes. + Attributes + ---------- + bounding_box : openmc.BoundingBox + Axis-aligned bounding box of the region + """ def __and__(self, other): return Intersection((self, other)) @@ -415,7 +420,7 @@ class Intersection(Region, MutableSequence): Attributes ---------- bounding_box : openmc.BoundingBox - Lower-left and upper-right coordinates of an axis-aligned bounding box + Axis-aligned bounding box of the region """ @@ -503,7 +508,7 @@ class Union(Region, MutableSequence): Attributes ---------- bounding_box : openmc.BoundingBox - Lower-left and upper-right coordinates of an axis-aligned bounding box + Axis-aligned bounding box of the region """ @@ -594,7 +599,7 @@ class Complement(Region): node : openmc.Region Regions to take the complement of bounding_box : openmc.BoundingBox - Lower-left and upper-right coordinates of an axis-aligned bounding box + Axis-aligned bounding box of the region """