Skip to content

Commit

Permalink
Update bounding_box docstrings (openmc-dev#2972)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulromano authored and church89 committed Jul 18, 2024
1 parent 29bec39 commit ed13179
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 1 addition & 2 deletions openmc/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
11 changes: 8 additions & 3 deletions openmc/region.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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
"""

Expand Down Expand Up @@ -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
"""

Expand Down Expand Up @@ -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
"""

Expand Down

0 comments on commit ed13179

Please sign in to comment.