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

Check for invalid domain IDs in volume calculations #2742

Merged

Conversation

paulromano
Copy link
Contributor

Description

As described in #2726, if you run a volume calculation with a domain that doesn't actually exist in the geometry, it will still run erroneously. This PR adds a check to ensure that the domain IDs specified actually exist in the geometry.

Fixes #2726

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format 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)

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.

Looks good! Thanks for the fix @paulromano.

@pshriwise pshriwise added the Merging Soon PR will be merged in < 24 hrs if no further comments are made. label Oct 20, 2023
@pshriwise pshriwise merged commit 979c164 into openmc-dev:develop Oct 23, 2023
18 checks passed
@paulromano paulromano deleted the volume-calc-check-invalid-ids branch October 23, 2023 18:51
stchaker pushed a commit to stchaker/openmc that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merging Soon PR will be merged in < 24 hrs if no further comments are made.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Volume calculation should error if an unused domain is provided
2 participants