limited precision of isotopes of expanded elements to 14 digits

This commit is contained in:
samuel shaner 2016-10-28 01:06:50 +00:00
parent 163f153ab6
commit bfc06a7341

View file

@ -253,6 +253,7 @@ class Element(object):
for nuclide, abundance in abundances.items():
nuc = openmc.Nuclide(nuclide)
nuc.scattering = self.scattering
isotopes.append((nuc, percent*abundance, percent_type))
pct = float('{:.14}'.format(percent*abundance))
isotopes.append((nuc, pct, percent_type))
return isotopes