updated tally arithmetic test for work for Python 3

This commit is contained in:
Sam Shaner 2015-12-19 10:50:07 -08:00
parent 911c88ff97
commit e4fc8e44ed
2 changed files with 4 additions and 69 deletions

View file

@ -1,15 +1,3 @@
Tally
ID = 10002
Name = (tally 1 * tally 2)
Filters =
material [1 3]
energy [ 0.00000000e+00 2.53000000e-07 1.00000000e-03 1.00000000e+00
2.00000000e+01]
distribcell [60]
mesh [1]
Nuclides = (U-235 * U-238) (U-235 * U-235) (Pu-239 * U-238) (Pu-239 * U-235)
Scores = [(nu-fission * total), (nu-fission * fission), (total * total), (total * fission)]
Estimator = tracklength
[[[ 8.90240785e-05 8.31464209e-11 4.41507090e-05 4.12357364e-11]
[ 7.29618709e-05 5.98879928e-05 3.61847984e-05 2.97009235e-05]
[ 4.69276830e-05 4.38293656e-11 2.35903380e-05 2.20328275e-11]
@ -39,19 +27,7 @@ Tally
[[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]]]Tally
ID = 10003
Name = (tally 1 * tally 2)
Filters =
material [1 3]
energy [ 0.00000000e+00 2.53000000e-07 1.00000000e-03 1.00000000e+00
2.00000000e+01]
distribcell [60]
mesh [1]
Nuclides = (U-235 * U-238) (U-235 * U-235) (Pu-239 * U-238) (Pu-239 * U-235)
Scores = [(nu-fission * total), (nu-fission * fission), (total * total), (total * fission)]
Estimator = tracklength
[[[ 8.90240785e-05 8.31464209e-11 4.41507090e-05 4.12357364e-11]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]]][[[ 8.90240785e-05 8.31464209e-11 4.41507090e-05 4.12357364e-11]
[ 7.29618709e-05 5.98879928e-05 3.61847984e-05 2.97009235e-05]
[ 4.69276830e-05 4.38293656e-11 2.35903380e-05 2.20328275e-11]
[ 3.84607356e-05 3.15690405e-05 1.93340411e-05 1.58696166e-05]]
@ -80,19 +56,7 @@ Tally
[[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]]]Tally
ID = 10004
Name = (tally 1 * tally 2)
Filters =
material [1 3]
energy [ 0.00000000e+00 2.53000000e-07 1.00000000e-03 1.00000000e+00
2.00000000e+01]
distribcell [60]
mesh [1]
Nuclides = U-235 Pu-239 U-238
Scores = [(nu-fission * total), (nu-fission * fission), (total * total), (total * fission)]
Estimator = tracklength
[[[ 7.29618709e-05 5.98879928e-05 3.61847984e-05 2.97009235e-05]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]]][[[ 7.29618709e-05 5.98879928e-05 3.61847984e-05 2.97009235e-05]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]]
@ -115,19 +79,7 @@ Tally
[[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]]]Tally
ID = 10005
Name = (tally 1 * tally 2)
Filters =
material [1 3]
energy [ 0.00000000e+00 2.53000000e-07 1.00000000e-03 1.00000000e+00
2.00000000e+01]
distribcell [60]
mesh [1]
Nuclides = (U-235 * U-238) (U-235 * U-235) (Pu-239 * U-238) (Pu-239 * U-235)
Scores = [u'nu-fission', u'total', u'fission']
Estimator = tracklength
[[[ 0.00000000e+00 4.41507090e-05 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]]][[[ 0.00000000e+00 4.41507090e-05 0.00000000e+00]
[ 0.00000000e+00 3.61847984e-05 0.00000000e+00]
[ 0.00000000e+00 2.35903380e-05 0.00000000e+00]
[ 0.00000000e+00 1.93340411e-05 0.00000000e+00]]
@ -156,19 +108,7 @@ Tally
[[ 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]]Tally
ID = 10006
Name = (tally 1 * tally 2)
Filters =
material [1 3]
energy [ 0.00000000e+00 2.53000000e-07 1.00000000e-03 1.00000000e+00
2.00000000e+01]
distribcell [60]
mesh [1]
Nuclides = U-235 Pu-239 U-238
Scores = [u'nu-fission', u'total', u'fission']
Estimator = tracklength
[[[ 0.00000000e+00 3.61847984e-05 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]][[[ 0.00000000e+00 3.61847984e-05 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00]]

View file

@ -83,27 +83,22 @@ class TallyArithmeticTestHarness(PyAPITestHarness):
# Perform all the tally arithmetic operations and output results
outstr = ''
tally_3 = tally_1 * tally_2
outstr += repr(tally_3)
outstr += str(tally_3.mean)
tally_3 = tally_1.hybrid_product(tally_2, '*', 'entrywise', 'tensor',
'tensor')
outstr += repr(tally_3)
outstr += str(tally_3.mean)
tally_3 = tally_1.hybrid_product(tally_2, '*', 'entrywise', 'entrywise',
'tensor')
outstr += repr(tally_3)
outstr += str(tally_3.mean)
tally_3 = tally_1.hybrid_product(tally_2, '*', 'entrywise', 'tensor',
'entrywise')
outstr += repr(tally_3)
outstr += str(tally_3.mean)
tally_3 = tally_1.hybrid_product(tally_2, '*', 'entrywise', 'entrywise',
'entrywise')
outstr += repr(tally_3)
outstr += str(tally_3.mean)
print(outstr)