Fix diff tally analog estimator

This commit is contained in:
Sterling Harper 2016-01-12 00:49:18 -05:00
parent 6ab847be4d
commit 7f3e6bdd88
2 changed files with 12 additions and 4 deletions

View file

@ -3401,9 +3401,7 @@ contains
! If a derivative is present, we can only use analog or collision
! estimators.
if (allocated(t % deriv) .and. t % estimator == ESTIMATOR_TRACKLENGTH) &
then
t % estimator = ESTIMATOR_COLLISION
end if
t % estimator = ESTIMATOR_COLLISION
! If settings.xml trigger is turned on, create tally triggers
if (trigger_on) then

View file

@ -758,7 +758,17 @@ contains
select case (t % estimator)
case (ESTIMATOR_ANALOG)
score = score * t % deriv % accumulator
if (p % event_nuclide == t % deriv % diff_nuclide) then
associate(mat => materials(p % material))
do l = 1, mat % n_nuclides
if (mat % nuclide(l) == t % deriv % diff_nuclide) exit
end do
score = score * (t % deriv % accumulator &
+ ONE / mat % atom_density(l))
end associate
else
score = score * t % deriv % accumulator
end if
case (ESTIMATOR_COLLISION)
if (t % deriv % dep_var == DIFF_NUCLIDE_DENSITY) then