From 9c9a13c48ea7dbb2984467b287314d849a1dca18 Mon Sep 17 00:00:00 2001 From: Rayan HADDAD <103775910+rayanhaddad169@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:28:59 +0100 Subject: [PATCH] enable polymorphisme for mix_materials (#3180) Co-authored-by: r.haddad --- openmc/material.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/material.py b/openmc/material.py index 1213ea669d..a6401216ad 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -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()])