mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Add tests for from_xml methods
This commit is contained in:
parent
f42a75a9e1
commit
c5632794de
4 changed files with 96 additions and 8 deletions
|
|
@ -936,14 +936,6 @@ class Material(IDManagerMixin):
|
|||
elif 'wo' in nuclide.attrib:
|
||||
mat.add_nuclide(name, float(nuclide.attrib['wo']), 'wo')
|
||||
|
||||
# Get each element
|
||||
for element in elem.findall('element'):
|
||||
name = element.attrib['name']
|
||||
if 'ao' in element.attrib:
|
||||
mat.add_element(name, float(element.attrib['ao']))
|
||||
elif 'wo' in element.attrib:
|
||||
mat.add_element(name, float(element.attrib['wo']), 'wo')
|
||||
|
||||
# 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