Skip to content

Allow StepResult.get_material to accept integer material ID#3872

Merged
paulromano merged 3 commits intoopenmc-dev:developfrom
AlvaroCubi:fix-#3869
Mar 12, 2026
Merged

Allow StepResult.get_material to accept integer material ID#3872
paulromano merged 3 commits intoopenmc-dev:developfrom
AlvaroCubi:fix-#3869

Conversation

@AlvaroCubi
Copy link
Contributor

Description

The StepResult.get_material method uses str for mat_id. Usually we pass int as ids. Now the function has been updated to work both with strings and integers.

A test has been added.

Fixes #3869

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)

@AlvaroCubi AlvaroCubi requested a review from paulromano as a code owner March 12, 2026 10:22
@paulromano paulromano changed the title Fix #3869 Allow StepResult.get_material to accept integer material ID Mar 12, 2026
@paulromano paulromano enabled auto-merge (squash) March 12, 2026 18:10
@paulromano paulromano merged commit 4bda85f into openmc-dev:develop Mar 12, 2026
17 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.

Support integer values for material IDs in StepResult.get_material

2 participants