diff --git a/openmc/tallies.py b/openmc/tallies.py
index b15e730386..91a1fb0eef 100644
--- a/openmc/tallies.py
+++ b/openmc/tallies.py
@@ -887,7 +887,7 @@ class Tally(object):
# Create deep copy of other tally to use for array concatenation
other_copy = copy.deepcopy(other)
- # FIXME: document and create vars for merge_filters, etc.
+ # Identify if filters, nuclides and scores are mergeable and/or equal
merge_filters = self._can_merge_filters(other)
merge_nuclides = self._can_merge_nuclides(other)
merge_scores = self._can_merge_scores(other)
@@ -2224,8 +2224,6 @@ class Tally(object):
else:
filter2_bins = [filter2.get_bin(i) for i in range(filter2.num_bins)]
- # FIXME: Why doesn't this swap data for sum and sum_sq???
-
# Adjust the mean data array to relect the new filter order
if self.mean is not None:
for bin1, bin2 in itertools.product(filter1_bins, filter2_bins):
@@ -2297,8 +2295,6 @@ class Tally(object):
self.nuclides[nuclide1_index] = nuclide2
self.nuclides[nuclide2_index] = nuclide1
- # FIXME: Why doesn't this swap data for sum and sum_sq???
-
# Adjust the mean data array to relect the new nuclide order
if self.mean is not None:
nuclide1_mean = self.mean[:, nuclide1_index, :].copy()
@@ -2371,8 +2367,6 @@ class Tally(object):
self.scores[score1_index] = score2
self.scores[score2_index] = score1
- # FIXME: Why doesn't this swap data for sum and sum_sq???
-
# Adjust the mean data array to relect the new nuclide order
if self.mean is not None:
score1_mean = self.mean[:, :, score1_index].copy()
diff --git a/tests/test_tally_arithmetic/geometry.xml b/tests/test_tally_arithmetic/geometry.xml
new file mode 100644
index 0000000000..ed66ef8e6b
--- /dev/null
+++ b/tests/test_tally_arithmetic/geometry.xml
@@ -0,0 +1,148 @@
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+ 1.26 1.26
+ 17 17
+ -10.71 -10.71
+
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+1 1 1 1 1 1 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+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/test_tally_arithmetic/inputs_test.dat b/tests/test_tally_arithmetic/inputs_test.dat
new file mode 100644
index 0000000000..1b6046f1ae
--- /dev/null
+++ b/tests/test_tally_arithmetic/inputs_test.dat
@@ -0,0 +1 @@
+57384883e37964076aa82c19fa542434331cdb09735d710485b5aa0ca3445d543729e40cb9c7b6a70e7101ef186923eb1ff6315c73b01ff257052838add68fc7
\ No newline at end of file
diff --git a/tests/test_tally_arithmetic/materials.xml b/tests/test_tally_arithmetic/materials.xml
new file mode 100644
index 0000000000..9454c0d8e6
--- /dev/null
+++ b/tests/test_tally_arithmetic/materials.xml
@@ -0,0 +1,246 @@
+
+
+ 71c
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/test_tally_arithmetic/settings.xml b/tests/test_tally_arithmetic/settings.xml
new file mode 100644
index 0000000000..64f95a3a46
--- /dev/null
+++ b/tests/test_tally_arithmetic/settings.xml
@@ -0,0 +1,16 @@
+
+
+
+ 100
+ 10
+ 5
+
+
+
+ -160 -160 -183 160 160 183
+
+
+
+
diff --git a/tests/test_tally_arithmetic/tallies.xml b/tests/test_tally_arithmetic/tallies.xml
new file mode 100644
index 0000000000..ab4d1c37d8
--- /dev/null
+++ b/tests/test_tally_arithmetic/tallies.xml
@@ -0,0 +1,21 @@
+
+
+
+ 2 2 2
+ -160.0 -160.0 -183.0
+ 160.0 160.0 183.0
+
+
+
+
+
+ U-235 Pu-239
+ nu-fission total
+
+
+
+
+ U-238 U-235
+ total fission
+
+