Merge pull request #279 from mit-crpg/negative_urr_vals_check

Added additional check for negative values in URR probability tables
This commit is contained in:
Paul Romano 2014-06-02 22:04:45 -04:00
commit 46f9e85ce3

View file

@ -393,7 +393,8 @@ contains
! Calculate elastic cross section/factor
elastic = ZERO
if (urr % prob(i_energy, URR_ELASTIC, i_table) > ZERO) then
if (urr % prob(i_energy, URR_ELASTIC, i_table) > ZERO .and. &
urr % prob(i_energy + 1, URR_ELASTIC, i_table) > ZERO) then
elastic = exp((ONE - f) * log(urr % prob(i_energy, URR_ELASTIC, &
i_table)) + f * log(urr % prob(i_energy + 1, URR_ELASTIC, &
i_table)))
@ -401,7 +402,8 @@ contains
! Calculate fission cross section/factor
fission = ZERO
if (urr % prob(i_energy, URR_FISSION, i_table) > ZERO) then
if (urr % prob(i_energy, URR_FISSION, i_table) > ZERO .and. &
urr % prob(i_energy + 1, URR_FISSION, i_table) > ZERO) then
fission = exp((ONE - f) * log(urr % prob(i_energy, URR_FISSION, &
i_table)) + f * log(urr % prob(i_energy + 1, URR_FISSION, &
i_table)))
@ -409,7 +411,8 @@ contains
! Calculate capture cross section/factor
capture = ZERO
if (urr % prob(i_energy, URR_N_GAMMA, i_table) > ZERO) then
if (urr % prob(i_energy, URR_N_GAMMA, i_table) > ZERO .and. &
urr % prob(i_energy + 1, URR_N_GAMMA, i_table) > ZERO) then
capture = exp((ONE - f) * log(urr % prob(i_energy, URR_N_GAMMA, &
i_table)) + f * log(urr % prob(i_energy + 1, URR_N_GAMMA, &
i_table)))