Turn the weight window game off for a zero or negative lower bound#3990
Open
jon-proximafusion wants to merge 1 commit into
Open
Turn the weight window game off for a zero or negative lower bound#3990jon-proximafusion wants to merge 1 commit into
jon-proximafusion wants to merge 1 commit into
Conversation
A weight window lower bound of zero means no weight window information exists there (MCNP wwinp files use a zero lower bound to turn the game off in a cell), and weight window generators mark such cells with -1. Treat a non-positive lower bound as "no window" in is_valid() so no weight window game is played, making zero and negative bounds equivalent. Previously a zero lower bound made the split branch demand a split at every checkpoint (weight over zero, clamped to max_split), multiplying the particle population until the split or weight cutoff limits stopped it. Split out of openmc-dev#3968 for focused review. Co-authored-by: shimwell <mail@jshimwell.com> Co-authored-by: jon-proxima <jon@proximafusion.com>
d525a5f to
300cae0
Compare
GuySten
approved these changes
Jul 1, 2026
GuySten
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me.
@pshriwise, what do you think?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A weight window lower bound of zero means no weight window information exists in a cell. MCNP wwinp files
use a zero lower bound to turn the weight window game off, and weight window generators mark cells with no
information using a value of -1. This treats a non-positive lower bound as "no window" in
is_valid(), sono weight window game is played there, making zero and negative bounds equivalent.
Without this, a zero lower bound sent the split branch into demanding a split at every checkpoint in the
cell (weight over zero, clamped to
max_split), multiplying the particle population until the split orweight cutoff limits stopped it.
Two regression tests are added: an all-zero-bounds run matches a weight-windows-off run, and a zero-bound
region matches a negative-bound region.
Split out of #3968 for focused review.
Checklist