Skip to content

Fix collision track feature for photon transport#3946

Open
pshriwise wants to merge 13 commits into
openmc-dev:developfrom
pshriwise:fix-collision-track-photons
Open

Fix collision track feature for photon transport#3946
pshriwise wants to merge 13 commits into
openmc-dev:developfrom
pshriwise:fix-collision-track-photons

Conversation

@pshriwise
Copy link
Copy Markdown
Contributor

Description

Please include a summary of the change and which issue is fixed if applicable. Please also include relevant motivation and context.

An alternative here would be to filter out electron collision events entirely, but the documentation and file format seem to indicate that these events for electrons and positrons will be present.

Fixes #3945

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)

@pshriwise pshriwise force-pushed the fix-collision-track-photons branch from 06d6e02 to 0f7f7d5 Compare May 28, 2026 03:00
@pshriwise pshriwise changed the title Fix collision track photons Fix collision track feature for photon transport May 28, 2026
@pshriwise
Copy link
Copy Markdown
Contributor Author

I came across a few other items in the course of this PR:

  • The CollisionTrackTestHarness was using the original PyAPITestHarness method for _check_results due to a misnaming so the nice methods for comparison of track files weren't being leveraged here.
  • The result files are all the same in this case because none of the various test parameters perturb transport. I opted to simply remove the result files as comparison of the collision track files is a more rigorous test of this feature.
  • Moved the two thread test to the unit tests. Because we're only checking the number of collisions written and aren't able to check that the set of events themselves are reproducible in this case it seemed to fit better there.

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.

Collision Track Feature Fails for Photon Transport

1 participant