Add back post-collision energy cutoff check

This commit is contained in:
Paul Romano 2018-03-14 11:58:59 -05:00
parent b670fe4421
commit 0358901e46

View file

@ -51,6 +51,13 @@ contains
call sample_positron_reaction(p)
end if
! Kill particle if energy falls below cutoff
if (p % E < energy_cutoff(p % type)) then
p % alive = .false.
p % wgt = ZERO
p % last_wgt = ZERO
end if
! Display information about collision
if (verbosity >= 10 .or. trace) then
if (p % type == NEUTRON) then
@ -170,7 +177,9 @@ contains
real(8) :: uvw(3) ! new direction
real(8) :: rel_vel ! relative velocity of electron
! Kill photon if below energy cutoff
! Kill photon if below energy cutoff -- an extra check is made here because
! photons with energy below the cutoff may have been produced by neutrons
! reactions or atomic relaxation
if (p % E < energy_cutoff(PHOTON)) then
p % E = ZERO
p % alive = .false.