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

Ensure that two surfaces with different boundary type are not considered redundant #2942

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

paulromano
Copy link
Contributor

Description

Right now, if you are exporting a model and ask it to remove redundant surfaces (Geometry.merge_surfaces = True), it compares the surface type and coefficients to determine whether two surfaces are considered equivalent. However, the boundary_type is not currently accounted for, which can cause problems if you have one surface with a boundary condition applied and another surface with no BC that is used on a lower universe level. This PR simply makes a change to account for the boundary_type when determining whether two surfaces are equivalent.

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)

Copy link
Member

@shimwell shimwell left a comment

Choose a reason for hiding this comment

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

This PR is clear enough that I can review it. All looks good. Thanks for adding the test. I can merge Tuesday afternoon (UK time) if there are no objections

@shimwell shimwell added the Merging Soon PR will be merged in < 24 hrs if no further comments are made. label Apr 8, 2024
@paulromano paulromano merged commit 256150f into openmc-dev:develop Apr 11, 2024
18 checks passed
@paulromano paulromano deleted the redundant-surfaces-bc branch April 11, 2024 13:01
church89 pushed a commit to openmsr/openmc that referenced this pull request Jul 18, 2024
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.

2 participants