Skip to content

Allow Mesh.volumes property for 1D and 2D RegularMesh#3914

Merged
paulromano merged 1 commit intoopenmc-dev:developfrom
shimwell:allow-volume-norm-1d-2d-mesh
May 6, 2026
Merged

Allow Mesh.volumes property for 1D and 2D RegularMesh#3914
paulromano merged 1 commit intoopenmc-dev:developfrom
shimwell:allow-volume-norm-1d-2d-mesh

Conversation

@shimwell
Copy link
Copy Markdown
Member

@shimwell shimwell commented Apr 5, 2026

Description

To help with PR #3877 it would be useful if we can get volumes for 1d and 2d meshes. @pshriwise is this ok to remove this defensive check so that meshes with dimensions not equal to 3 are allowed, I think this might come from a time when meshes were only 3d?

Fixes # (issue)

Checklist

  • I have performed a self-review of my own code
    ~ - [ ] I have run clang-format (version 18) 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) ~

@shimwell
Copy link
Copy Markdown
Member Author

@pshriwise is there any chance you can take a peak at this as I think it removes a defensive check you originally put in.

@paulromano paulromano changed the title allow 2d 1d meshes Allow Mesh.volumes property for 1D and 2D RegularMesh May 6, 2026
Copy link
Copy Markdown
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @shimwell!

@paulromano paulromano merged commit e542b2f into openmc-dev:develop May 6, 2026
17 checks passed
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