Skip to content

Commit

Permalink
enable polymorphisme for mix_materials (#3180)
Browse files Browse the repository at this point in the history
Co-authored-by: r.haddad <[email protected]>
  • Loading branch information
rayanhaddad169 and r.haddad authored Oct 28, 2024
1 parent 82a6f9e commit 9c9a13c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openmc/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ def mix_materials(cls, materials, fracs: Iterable[float],
if name is None:
name = '-'.join([f'{m.name}({f})' for m, f in
zip(materials, fracs)])
new_mat = openmc.Material(name=name)
new_mat = cls(name=name)

# Compute atom fractions of nuclides and add them to the new material
tot_nuclides_per_cc = np.sum([dens for dens in nuclides_per_cc.values()])
Expand Down

0 comments on commit 9c9a13c

Please sign in to comment.