Repository navigation
Fix triggers - #2344
Merged
Merged
Fix triggers#2344
Conversation
Contributor
|
This fixes the issue I was seeing - thanks for this really thorough fix! |
aprilnovak
approved these changes
Jan 10, 2023
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.
This PR resolves #2342 and #2343.
For #2342, The loop over tally scores in
check_tally_triggerhas been removed -- only the score index on the trigger is checked. A test was added ensuring that the addition of unrelated scores on a tally doesn't influence the number of batches needed to satisfy a tally trigger.For #2343, the
get_tally_uncertaintyfunction returns an invalid result for a tally value if the mean is zero. This invalid result prompts thecheck_tally_triggerfunction to set the outgoing uncertainty-to-trigger threshold ratio value to infinity and exit early (no other tally result will produce a larger ratio, so we can do this safely). A ratio of infinity is used to trigger a different output to the console to indicate that the reason the trigger is unsatisfied is there was no contribution for the specified score.Update: Adding a link to a CI run on my fork that contains only the first commit from this PR that adds the tests https://github.com/pshriwise/openmc/actions/runs/3850717720/jobs/6561182511