Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mat ids reset #3125

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Conversation

azimgivron
Copy link

@azimgivron azimgivron commented Sep 5, 2024

Description

Bug Fix: Prevent Material ID Reset During Depletion

This pull request addresses a bug where the IDs of multiple classes, including openmc.Material, are reset after performing a depletion, causing conflicts when new materials are created post-depletion. The issue arose due to a blanket ID reset mechanism designed to avoid tally ID warnings, which inadvertently affected all classes inheriting from IDManagerMixin, including materials.

Changes Introduced:

  • New Class Method IDManagerMixin.reset_ids(): Introduced a new class method that specifically handles the resetting.
  • Modified reset_auto_ids Method: Adjusted the behavior of the reset_auto_ids method.
  • Modified OpenMCOperator Class: Replaced reset_auto_ids method to only reset tallies ids.

This PR resolves the material ID conflict issue and allows the depletion process to run without resetting non-tally IDs.

Fixes #2793

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)

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.

material IDs conflict caused by depletion
1 participant