Determine nuclides correctly for DAGMC models in d1s.get_radionuclides (#3335)

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Stefano Segantin 2025-03-06 16:33:26 -05:00 committed by GitHub
parent e360cb467e
commit 9bfce4ee1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,8 +33,10 @@ def get_radionuclides(model: openmc.Model, chain_file: str | None = None) -> lis
List of nuclide names
"""
# Determine what nuclides appear in model
model_nuclides = set(model.geometry.get_all_nuclides())
# Determine what nuclides appear in the model
model_nuclides = {nuc for mat in model._materials_by_id.values()
for nuc in mat.get_nuclides()}
# Load chain file
if chain_file is None: