mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Using python's any function to inherit involved materials' attr
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
b7a4beff5c
commit
ccd76516f1
1 changed files with 1 additions and 4 deletions
|
|
@ -1081,10 +1081,7 @@ class Material(IDManagerMixin):
|
|||
|
||||
# If any of the involved materials is depletable, the new material is
|
||||
# depletable
|
||||
for mat in materials:
|
||||
if mat.depletable:
|
||||
new_mat.depletable = True
|
||||
break
|
||||
new_mat.depletable = any(mat.depletable for mat in materials)
|
||||
|
||||
return new_mat
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue