Skip to content

adding trigger to mgxs convert#3925

Draft
shimwell wants to merge 3 commits into
openmc-dev:developfrom
shimwell:trigger-mgxs-generation
Draft

adding trigger to mgxs convert#3925
shimwell wants to merge 3 commits into
openmc-dev:developfrom
shimwell:trigger-mgxs-generation

Conversation

@shimwell

Copy link
Copy Markdown
Member

Description

At Physor 2026 an chatting with @jtramm and @pshriwise about making generation of multigroup use a trigger to allow it to end earlier if the reaction rates all meet the trigger relative error value. At the time it sounded like a good idea but in practice it appears to have enlarged the api interface to users which I was trying to avoid. I wanted to make this a draft PR just to show @jtramm and @pshriwise that I tried.

Fixes # (issue)

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)

@shimwell shimwell requested a review from pshriwise as a code owner April 22, 2026 13:10
@shimwell shimwell marked this pull request as draft April 22, 2026 13:10
jon-proximafusion and others added 2 commits June 23, 2026 13:19
convert_to_multigroup now defaults nparticles=None ("auto"). In auto mode the
continuous-energy generation run is no longer given a fixed, guessed particle
count; a relative-error trigger (ignore_zeros=True) is attached to the
cross-section tallies via Library.tally_trigger, so the run extends batches
until the group constants are statistically converged, bounded by an internal
max_batches cap. Passing an explicit integer keeps the previous fixed behaviour.

The convergence target, seed particles-per-batch and max-batches cap are
internal constants rather than new user-facing arguments, so the public API
gains no knobs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants