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

Make sure direction is set when checking source spatial constraints #3022

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

paulromano
Copy link
Contributor

Description

When #2916 refactored how source constraints are handled, it looks like a bug was introduced for checking spatial constraints. Namely, a GeomState object is created and the position is set, but the direction was not set (see here for the previous code). I noticed recently when running a DAGMC geometry that this was resulting in the source being rejected when it shouldn't have been. This PR fixes this by setting an arbitrary direction on the GeomState object as we did before.

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
Contributor

@egor1abs egor1abs left a comment

Choose a reason for hiding this comment

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

Thanks for the fix!

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.

Pretty straightforward. Thanks @paulromano!

@pshriwise
Copy link
Contributor

Will merge at EOB if there are no other concerns.

@pshriwise
Copy link
Contributor

It's a sensical one-liner. Going to go ahead w this one...

@pshriwise pshriwise merged commit 2a53aba into openmc-dev:develop Jun 3, 2024
18 checks passed
@paulromano paulromano deleted the spatial-constraint-fix branch June 4, 2024 17:19
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.

3 participants