enable polymorphisme for mix_materials (#3180)

Co-authored-by: r.haddad <r.haddad@naarea.fr>
This commit is contained in:
Rayan HADDAD 2024-10-28 17:28:59 +01:00 committed by GitHub
parent 82a6f9e40b
commit 9c9a13c48e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1536,7 +1536,7 @@ class Material(IDManagerMixin):
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()])