Merge branch 'develop' into mgxs

This commit is contained in:
Will Boyd 2015-10-24 19:39:00 -04:00
commit 21738db07d
3 changed files with 7 additions and 27 deletions

View file

@ -10,7 +10,6 @@ from xml.etree import ElementTree as ET
import sys
import numpy as np
import h5py
from openmc import Mesh, Filter, Trigger, Nuclide
from openmc.cross import CrossScore, CrossNuclide, CrossFilter
@ -303,6 +302,7 @@ class Tally(object):
return None
if not self._results_read:
import h5py
# Open the HDF5 statepoint file
f = h5py.File(self._sp_filename, 'r')

View file

@ -2810,6 +2810,10 @@ contains
! MOMENT_STRS(:)
! If so, check the order, store if OK, then reset the number to 'n'
score_name = trim(sarray(j))
! Append the score to the list of possible trigger scores
if (trigger_on) call trigger_scores % add_key(trim(score_name), j)
do imomstr = 1, size(MOMENT_STRS)
if (starts_with(score_name,trim(MOMENT_STRS(imomstr)))) then
n_order_pos = scan(score_name,'0123456789')
@ -3210,11 +3214,8 @@ contains
end if
end select
! Append the score to the list of possible trigger scores
if (trigger_on) call trigger_scores % add_key(trim(score_name), l)
end do
t % n_score_bins = n_scores
t % n_user_score_bins = n_words

View file

@ -92,7 +92,6 @@ contains
character(len=52), intent(inout) :: name ! "eigenvalue" or tally score
integer :: i ! index in tallies array
integer :: j ! level in tally hierarchy
integer :: n ! loop index for nuclides
integer :: s ! loop index for triggers
integer :: filter_index ! index in results array for filters
@ -167,28 +166,8 @@ contains
! Initialize bins, filter level
matching_bins(1:t % n_filters) = 0
j = 1
! Find filter index
FILTER_LOOP: do
find_bin: do
if (t % n_filters == 0) exit find_bin
matching_bins(j) = matching_bins(j) + 1
if (matching_bins(j) > t % filters(j) % n_bins) then
if (j == 1) exit FILTER_LOOP
matching_bins(j) = 0
j = j - 1
else
if (j == t % n_filters) exit find_bin
end if
end do find_bin
if (t % n_filters > 0) then
filter_index = sum((max(matching_bins(1:t%n_filters),1) - 1) * &
t % stride) + 1
else
filter_index = 1
end if
FILTER_LOOP: do filter_index = 1, t % total_filter_bins
! Initialize score index
score_index = trigger % score_index