mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Fix the bug in the Material.from_xml_element function (#3278)
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
8626ce5c43
commit
27f3afefa4
1 changed files with 3 additions and 1 deletions
|
|
@ -1582,7 +1582,6 @@ class Material(IDManagerMixin):
|
|||
|
||||
if 'volume' in elem.attrib:
|
||||
mat.volume = float(elem.get('volume'))
|
||||
mat.depletable = bool(elem.get('depletable'))
|
||||
|
||||
# Get each nuclide
|
||||
for nuclide in elem.findall('nuclide'):
|
||||
|
|
@ -1592,6 +1591,9 @@ class Material(IDManagerMixin):
|
|||
elif 'wo' in nuclide.attrib:
|
||||
mat.add_nuclide(name, float(nuclide.attrib['wo']), 'wo')
|
||||
|
||||
# Get depletable attribute
|
||||
mat.depletable = elem.get('depletable') in ('true', '1')
|
||||
|
||||
# Get each S(a,b) table
|
||||
for sab in elem.findall('sab'):
|
||||
fraction = float(sab.get('fraction', 1.0))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue