Ability to plot 2D mesh tallies.

This commit is contained in:
Paul Romano 2012-11-18 14:28:57 -05:00
parent b504ae4777
commit c88615bdd7

View file

@ -47,11 +47,16 @@ for t in sp.tallies:
if 'mesh' not in t.filters:
continue
# Get Mesh object
# Get Mesh object and determine size
m = sp.meshes[t.filters['mesh'].bins[0] - 1]
nx, ny, nz = m.dimension
ns = t.total_score_bins * t.total_filter_bins / (nx*ny*nz)
if len(m.dimension) == 2:
nx, ny = m.dimension
nz = 1
else:
nx, ny, nz = m.dimension
# Calculate number of score bins
ns = t.total_score_bins * t.total_filter_bins / (nx*ny*nz)
assert n_bins == nx*ny*nz*ns
# Create lists for tallies