diff --git a/docs/source/pythonapi/examples/mgxs-part-i.ipynb b/docs/source/pythonapi/examples/mgxs-part-i.ipynb index f3433b98c4..0cfebedc34 100644 --- a/docs/source/pythonapi/examples/mgxs-part-i.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-i.ipynb @@ -530,8 +530,8 @@ " Copyright: 2011-2016 Massachusetts Institute of Technology\n", " License: http://openmc.readthedocs.io/en/latest/license.html\n", " Version: 0.7.1\n", - " Git SHA1: edf2dd76c731a711cea7bbc28f0982292c19389f\n", - " Date/Time: 2016-07-05 08:42:21\n", + " Git SHA1: 092760d59fbac8d929ab33b5fdc48eab0c6cc8ac\n", + " Date/Time: 2016-07-05 08:53:58\n", " MPI Processes: 4\n", "\n", " ===========================================================================\n", @@ -587,20 +587,20 @@ "\n", " =======================> TIMING STATISTICS <=======================\n", "\n", - " Total time for initialization = 9.5600E-01 seconds\n", - " Reading cross sections = 2.7100E-01 seconds\n", - " Total time in simulation = 1.7180E+00 seconds\n", - " Time in transport only = 1.6250E+00 seconds\n", - " Time in inactive batches = 2.7700E-01 seconds\n", - " Time in active batches = 1.4410E+00 seconds\n", + " Total time for initialization = 1.2080E+00 seconds\n", + " Reading cross sections = 2.6300E-01 seconds\n", + " Total time in simulation = 1.6120E+00 seconds\n", + " Time in transport only = 1.5200E+00 seconds\n", + " Time in inactive batches = 2.8400E-01 seconds\n", + " Time in active batches = 1.3280E+00 seconds\n", " Time synchronizing fission bank = 6.1000E-02 seconds\n", " Sampling source sites = 0.0000E+00 seconds\n", " SEND/RECV source sites = 1.0000E-03 seconds\n", - " Time accumulating tallies = 2.0000E-03 seconds\n", + " Time accumulating tallies = 0.0000E+00 seconds\n", " Total time for finalization = 5.0000E-03 seconds\n", - " Total time elapsed = 2.6810E+00 seconds\n", - " Calculation Rate (inactive) = 36101.1 neutrons/second\n", - " Calculation Rate (active) = 6939.63 neutrons/second\n", + " Total time elapsed = 2.8290E+00 seconds\n", + " Calculation Rate (inactive) = 35211.3 neutrons/second\n", + " Calculation Rate (active) = 7530.12 neutrons/second\n", "\n", " ============================> RESULTS <============================\n", "\n", @@ -681,62 +681,122 @@ "text": [ "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n", "['mesh']\n", "[((1, 1, 1), (1, 2, 1), (2, 1, 1), (2, 2, 1))]\n", + "4\n", + "4\n", + "4\n", + "4\n", "[0]\n", "[10000]\n" ] diff --git a/openmc/tallies.py b/openmc/tallies.py index 0531cf47fe..4fc19f1e5d 100644 --- a/openmc/tallies.py +++ b/openmc/tallies.py @@ -2983,18 +2983,13 @@ class Tally(object): bin_indices.extend([bin_index]) bin_indices.extend([bin_index, bin_index+1]) num_bins += 1 - elif filter_type == 'distribcell': + elif filter_type in ['distribcell', 'mesh']: bin_indices = [0] num_bins = find_filter.num_bins - elif filter_type == 'mesh': - bin_indices = [0] - num_bins = find_filter.mesh.num_mesh_cells else: bin_indices.append(bin_index) num_bins += 1 - print(bin_indices) - print(find_filter.bins) find_filter.bins = np.unique(find_filter.bins[bin_indices]) find_filter.num_bins = num_bins