Fix use of enrichment with Material.add_elements_from_formula

This commit is contained in:
Paul Romano 2020-07-10 07:20:50 -05:00
parent d426b3a24e
commit 46f322fe0f

View file

@ -654,6 +654,8 @@ class Material(IDManagerMixin):
if enrichment_target is not None and element == re.sub(r'\d+$', '', enrichment_target):
self.add_element(element, percent, percent_type, enrichment,
enrichment_target, enrichment_type)
elif enrichment is not None and enrichment_target is None and element == 'U':
self.add_element(element, percent, percent_type, enrichment)
else:
self.add_element(element, percent, percent_type)