Moved scattering to occur before russian roulette, and set last_wgt to 0 as well when a particle is killed via russian roulette.

This commit is contained in:
Adam Nelson 2014-06-26 13:06:46 -04:00
parent 6742584b9b
commit 56d0b3b89f

View file

@ -105,6 +105,10 @@ contains
end if
if (.not. p % alive) return
! Sample a scattering reaction and determine the secondary energy of the
! exiting neutron
call scatter(p, i_nuclide)
! Play russian roulette if survival biasing is turned on
if (survival_biasing) then
@ -112,11 +116,6 @@ contains
if (.not. p % alive) return
end if
! Sample a scattering reaction and determine the secondary energy of the
! exiting neutron
call scatter(p, i_nuclide)
end subroutine sample_reaction
!===============================================================================
@ -297,6 +296,7 @@ contains
p % last_wgt = p % wgt
else
p % wgt = ZERO
p % last_wgt = ZERO
p % alive = .false.
end if
end if