Skip to content

Fix not reseting filter_matches corrupt pulse height results#4019

Merged
paulromano merged 2 commits into
openmc-dev:developfrom
GuySten:fix-pulse-height
Jul 17, 2026
Merged

Fix not reseting filter_matches corrupt pulse height results#4019
paulromano merged 2 commits into
openmc-dev:developfrom
GuySten:fix-pulse-height

Conversation

@GuySten

@GuySten GuySten commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

When pulse height tallies were tallied when the FilterBinIter was empty the particle filter_matches were not reset correctly.
That fact corrupted the tally results.
This PR fix that behavior and add a unit test that failed before.

Fixes #4018

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)

@paulromano paulromano 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.

Thanks @GuySten!

@paulromano
paulromano enabled auto-merge (squash) July 17, 2026 12:34
@paulromano
paulromano merged commit 796ae38 into openmc-dev:develop Jul 17, 2026
16 checks passed
@GuySten
GuySten deleted the fix-pulse-height branch July 17, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pulse-height tally only scores first cell when using a multi-cell CellFilter and EnergyFilter

2 participants