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

Fix a corner case in Region.from_expression #2081

Merged
merged 2 commits into from Jun 10, 2022

Conversation

paulromano
Copy link
Contributor

If you pass the expression 1(2|-3) to Region.from_expression right now, it doesn't recognize that there's an implicit intersection operator between the 1 and the (. This PR fixes this behavior to correctly insert the intersection operator between them and is accompanied by a (previously failing) test case.

Once again, this bug was found as a result of working with the ITER E-lite model.

@paulromano paulromano requested a review from pshriwise June 9, 2022 17:49
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.

Simple enough. Thanks @paulromano!

@paulromano
Copy link
Contributor Author

@pshriwise I just added a one-line change in this PR to address #2082. Hope you don't mind!

@pshriwise
Copy link
Contributor

@pshriwise I just added a one-line change in this PR to address #2082. Hope you don't mind!

Works for me! I'll merge later today if there are no other comments.

@pshriwise pshriwise merged commit fc38201 into openmc-dev:develop Jun 10, 2022
@paulromano paulromano deleted the region-parenthesis-fix branch June 13, 2022 11:42
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.

None yet

2 participants