Skip to content

Fix distribcell labels for lattices used as fill in multiple cells - #2813

Merged
paulromano merged 7 commits into
openmc-dev:developfrom
pshriwise:fix-dcp-rect
Apr 8, 2024
Merged

paulromano merged 7 commits into
openmc-dev:developfrom
pshriwise:fix-dcp-rect

Conversation

@pshriwise

@pshriwise pshriwise commented Dec 19, 2023 •

Copy link
Copy Markdown
Contributor

Description

Partial fix for #2798. This fixes the creation of distribcell filter bin labels for the tallies.out file and the DistribcellFilter::get_all_bins for models that fill more than one cell with the same lattice. Without this change, all tally cell instance results are attributed to the set of cell instances in the first use of the lattice. I've extended the test_cell_instances.py to ensure that the tallies.out file is written successfully and that tally results are present for all bins in the test problem to verify that this fix is correct.

Note: This fix only applies to the RectangularLattice further corrections are needed for HexagonalLattice's (see #2798) for more info.

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)

@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 for the fix @pshriwise! I made one small update in the tests but otherwise looked good

@paulromano
paulromano enabled auto-merge (squash) April 7, 2024 14:55
@paulromano
paulromano merged commit c85ba93 into openmc-dev:develop Apr 8, 2024
church89 pushed a commit to openmsr/openmc that referenced this pull request Jul 18, 2024
apingegno pushed a commit to apingegno/openmc that referenced this pull request May 7, 2026
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