Skip to content

Add bounding_box property to RectilinearMesh and UnstructuredMesh - #2861

Merged
pshriwise merged 2 commits into
openmc-dev:developfrom
paulromano:mesh-bounding-box
Jan 31, 2024
Merged

pshriwise merged 2 commits into
openmc-dev:developfrom
paulromano:mesh-bounding-box

Conversation

@paulromano

Copy link
Copy Markdown
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
Comment thread 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
Copy Markdown
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

Comment thread openmc/mesh.py Outdated
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
Copy Markdown
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

@pshriwise pshriwise left a comment

Copy link
Copy Markdown
Contributor

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
@paulromano
paulromano deleted the mesh-bounding-box branch February 2, 2024 03:56
@pshriwise pshriwise mentioned this pull request Jan 8, 2025
2 of 4 tasks
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