Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bounding_box property to RectilinearMesh and UnstructuredMesh #2861

Merged
merged 2 commits into from
Jan 31, 2024

Conversation

paulromano
Copy link
Contributor

Description

I noticed that bounding_box, lower_left, and upper_right properties were missing on the RectilinearMesh and UnstructuredMesh classes. This small PR adds them in. For UnstructuredMesh, those properties only work when the mesh has been loaded from a statepoint (and vertex information is available).

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

@paulromano paulromano requested a review from pshriwise January 29, 2024 18:59
openmc/mesh.py Outdated
Axis-aligned cartesian bounding box of cell defined by upper-right and lower-
left coordinates
bounding_box : openmc.BoundingBox
Axis-aligned bounding box of the cell defined by the upper-right and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Axis-aligned bounding box of the cell defined by the upper-right and
Axis-aligned bounding box of the mesh as defined by the upper-right and

openmc/mesh.py Outdated
@@ -1666,8 +1675,8 @@ class SphericalMesh(StructuredMesh):
The upper-right corner of the structured mesh. If only two coordinate
are given, it is assumed that the mesh is an x-y mesh.
bounding_box : openmc.BoundingBox
Axis-aligned bounding box of the cell defined by the upper-right and lower-
left coordinates
Axis-aligned bounding box of the cell defined by the upper-right and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Axis-aligned bounding box of the cell defined by the upper-right and
Axis-aligned bounding box of the mesh as defined by the upper-right and

Copy link
Contributor

@pshriwise pshriwise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for completing these methods @paulromano! A couple of small nitpicks in the doc strings and we'll get this merged in asap.

@pshriwise pshriwise merged commit f14fc55 into openmc-dev:develop Jan 31, 2024
18 checks passed
@paulromano paulromano deleted the mesh-bounding-box branch February 2, 2024 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants