Skip to content

Turn the weight window game off for a zero or negative lower bound#3990

Open
jon-proximafusion wants to merge 1 commit into
openmc-dev:developfrom
shimwell:ww-zero-lower-bound-no-game
Open

Turn the weight window game off for a zero or negative lower bound#3990
jon-proximafusion wants to merge 1 commit into
openmc-dev:developfrom
shimwell:ww-zero-lower-bound-no-game

Conversation

@jon-proximafusion

@jon-proximafusion jon-proximafusion commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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(), so
no 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 or
weight 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

  • I have performed a self-review of my own code
  • I have run clang-format (version 18) 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)

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>
@jon-proximafusion jon-proximafusion force-pushed the ww-zero-lower-bound-no-game branch from d525a5f to 300cae0 Compare July 1, 2026 14:16

@GuySten GuySten 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 to me.
@pshriwise, what do you think?

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