mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-26 21:25:36 -04:00
More efficient regex usage
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
839c0fe81b
commit
c2018c41fd
1 changed files with 1 additions and 2 deletions
|
|
@ -420,8 +420,7 @@ class Material(IDManagerMixin):
|
|||
|
||||
# If the Material contains the element, delete it
|
||||
for nuc in reversed(self.nuclides):
|
||||
element_name = re.split(r'(\d+)', nuc.name)[0]
|
||||
print(element_name, element)
|
||||
element_name = re.split(r'\d+', nuc.name)[0]
|
||||
if element_name == element:
|
||||
self.nuclides.remove(nuc)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue