mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Iterate over all libraries, not children, in Element.expand
After PR #1247, the cross section file is allowed to contain the depletion chain file. This is present as a new tag, of the form ``` <depletion_chain path="path.xml" type="depletion_chain" /> ``` The Element.expand method looked for `material` attributes in all children of the OPENMC_CROSS_SECTION file. This caused an error for the depletion_chain element. Now, only those children with the `library` tag are iterated over.
This commit is contained in:
parent
2c0b16e73d
commit
3e165c0d54
1 changed files with 1 additions and 1 deletions
|
|
@ -98,7 +98,7 @@ class Element(str):
|
|||
library_nuclides = set()
|
||||
tree = ET.parse(cross_sections)
|
||||
root = tree.getroot()
|
||||
for child in root:
|
||||
for child in root.findall('library'):
|
||||
nuclide = child.attrib['materials']
|
||||
if re.match(r'{}\d+'.format(self), nuclide) and \
|
||||
'_m' not in nuclide:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue