fixed issue in tally.get_slice()

This commit is contained in:
Sam Shaner 2016-07-05 10:18:50 -04:00
parent 092760d59f
commit d7b911645d
2 changed files with 73 additions and 18 deletions

View file

@ -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"
]

View file

@ -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