Skip to content

Comments

Store atomic mass in ParticleType.#3765

Merged
paulromano merged 12 commits intoopenmc-dev:developfrom
GuySten:atomic_mass
Feb 14, 2026
Merged

Store atomic mass in ParticleType.#3765
paulromano merged 12 commits intoopenmc-dev:developfrom
GuySten:atomic_mass

Conversation

@GuySten
Copy link
Contributor

@GuySten GuySten commented Feb 3, 2026

Description

Atomic mass is a property of particle type so this PR makes atomic mass a property of the new ParticleType.

This makes the atomic mass of a particle more accessible.

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)

@GuySten GuySten requested a review from amandalund as a code owner February 4, 2026 01:10
Copy link
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 @GuySten -- I think this will come in very handy. However, it would be nice to get this PR updated so that it doesn't change test results (see my comment below)

@GuySten GuySten requested a review from paulromano February 4, 2026 07:22
@GuySten GuySten added the Data label Feb 5, 2026
@GuySten GuySten requested a review from paulromano February 12, 2026 16:17
Copy link
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 contribution @GuySten! I restored the specific mass-energy equivalent values for neutrons and electrons/positrons and used those in speed() to keep the tests passing. This allows us to keep all CODATA values.

@paulromano paulromano enabled auto-merge (squash) February 14, 2026 00:51
@paulromano paulromano merged commit 7fc5b94 into openmc-dev:develop Feb 14, 2026
15 checks passed
@GuySten GuySten deleted the atomic_mass branch February 14, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants