Skip to content

Add type checks on Intersection, Union, Complement - #2685

Merged
pshriwise merged 1 commit into
openmc-dev:developfrom
paulromano:region-typecheck
Sep 13, 2023
Merged

pshriwise merged 1 commit into
openmc-dev:developfrom
paulromano:region-typecheck

Conversation

@paulromano

Copy link
Copy Markdown
Contributor

Description

This PR performs type checks on operands to the Intersection, Union, and Complement classes. I decided not to use our standard check_type function because there was a noticeable overhead on very large CSG models (e.g., calling Model.from_xml()).

Closes #2563

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)

@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.

Looks good @paulromano. Thanks!

@pshriwise
pshriwise merged commit 0cf29f1 into openmc-dev:develop Sep 13, 2023
@paulromano
paulromano deleted the region-typecheck branch September 13, 2023 18:05
stchaker pushed a commit to stchaker/openmc that referenced this pull request Oct 25, 2023
apingegno pushed a commit to apingegno/openmc that referenced this pull request May 7, 2026
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.

Potential for error check when region uses intersection or union operations between surface objects and integers

2 participants