From bfc06a7341fdc3aada51e914470f79feda60744b Mon Sep 17 00:00:00 2001 From: samuel shaner Date: Fri, 28 Oct 2016 01:06:50 +0000 Subject: [PATCH] limited precision of isotopes of expanded elements to 14 digits --- openmc/element.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openmc/element.py b/openmc/element.py index 3bc7345947..1416ba1eb6 100644 --- a/openmc/element.py +++ b/openmc/element.py @@ -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