Skip to content

avoid adding ParticleNuclideFilter multiple times to tally in prepare_tallies#75

Open
shimwell wants to merge 3 commits intodevelopfrom
avoid-adding-paremtnuclidefilter_twice
Open

avoid adding ParticleNuclideFilter multiple times to tally in prepare_tallies#75
shimwell wants to merge 3 commits intodevelopfrom
avoid-adding-paremtnuclidefilter_twice

Conversation

@shimwell
Copy link
Owner

@shimwell shimwell commented Jul 18, 2025

Description

This Pr adds a check to ensure that the prepare_tallies function in d1s doesn't add a particle filter to a tally if the tally already has a particle filter.

I noticed this is a potential issue if the user is performing d1s studies with mixed dd and dt pulses, it is easy to overly prepare the tallies and get strange results as a consequence. I have accidentally "over prepared tallies" and it took a while to realize what was going wrong.

Fixes # (issue)

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) 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 changed the title added-check-for-parnucfilter avoid adding ParticleNuclideFilter multiple times to tally in prepare_tallies Jul 18, 2025
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