Skip to content

Refactor form_matrix method on depletion chain class#3892

Merged
paulromano merged 3 commits intoopenmc-dev:developfrom
eepeterson:refactor_form_matrix
Apr 3, 2026
Merged

Refactor form_matrix method on depletion chain class#3892
paulromano merged 3 commits intoopenmc-dev:developfrom
eepeterson:refactor_form_matrix

Conversation

@eepeterson
Copy link
Copy Markdown
Contributor

Description

This PR breaks up the responsibilities of the form_matrix method into separate methods - one for decay and one for the reaction rates. The decay matrix can be created once and cached on the chain so it doesn't need to be recomputed for every material for every step and/or stage in higher order integration schemes. While this provides no real performance benefit by itself yet, it enables other modifications that do and generally improves the separation of responsibility in the depletion module.

Fixes # (issue)
N/A

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)

@eepeterson eepeterson requested a review from paulromano as a code owner March 20, 2026 04:17
Copy link
Copy Markdown
Contributor

@paulromano paulromano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this improvement @eepeterson!

@paulromano paulromano enabled auto-merge (squash) April 3, 2026 20:43
@paulromano paulromano merged commit 60d1dfb into openmc-dev:develop Apr 3, 2026
16 checks passed
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