Use structured array for global tallies with mean and std_dev fields

This commit is contained in:
Paul Romano 2015-09-17 07:12:05 +07:00
parent c99c1f1870
commit 8b67fa7a92
2 changed files with 25 additions and 60 deletions

View file

@ -30,9 +30,10 @@ class FixedSourceTestHarness(TestHarness):
outstr += '\n'.join(results) + '\n'
tally_num += 1
gt = sp.global_tallies
outstr += 'leakage:\n'
outstr += '{0:12.6E}'.format(sp.global_tallies[3][0]) + '\n'
outstr += '{0:12.6E}'.format(sp.global_tallies[3][1]) + '\n'
outstr += '{0:12.6E}'.format(gt[gt['name'] == b'leakage'][0]['sum']) + '\n'
outstr += '{0:12.6E}'.format(gt[gt['name'] == b'leakage'][0]['sum_sq']) + '\n'
return outstr