From d6d77d2962cd66f2a9b74d81fc91c60845af9069 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 12 Nov 2018 14:00:53 -0600 Subject: [PATCH] Fix list of inelastic scattering reactions --- src/endf.F90 | 22 ++++++++++++---------- src/nuclide_header.F90 | 10 +++------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/endf.F90 b/src/endf.F90 index 66f2d53e1d..0d458a0ab6 100644 --- a/src/endf.F90 +++ b/src/endf.F90 @@ -229,7 +229,7 @@ contains integer, intent(in) :: MT logical :: dis - if (MT >= N_GAMMA .and. MT <= N_DA) then + if (MT >= N_DISAPPEAR .and. MT <= N_DA) then dis = .true. elseif (MT >= N_P0 .and. MT <= N_AC) then dis = .true. @@ -242,25 +242,27 @@ contains end function is_disappearance !=============================================================================== -! IS_SCATTER determines if a given MT number is that of a scattering event +! IS_INELASTIC_SCATTER determines if a given MT number is that of an inelastic +! scattering event !=============================================================================== - function is_scatter(MT) result(scatter_event) + function is_inelastic_scatter(MT) result(retval) integer, intent(in) :: MT - logical :: scatter_event + logical :: retval if (MT < 100) then - if (MT == N_FISSION .or. MT == N_F .or. MT == N_NF .or. MT == N_2NF & - .or. MT == N_3NF) then - scatter_event = .false. + if (is_fission(MT)) then + retval = .false. else - scatter_event = .true. + retval = (MT >= MISC .and. MT /= 27) end if + elseif (MT < 200) then + retval = (.not. is_disappearance(MT)) else - scatter_event = .false. + retval = .false. end if - end function is_scatter + end function end module endf diff --git a/src/nuclide_header.F90 b/src/nuclide_header.F90 index af66e4974b..dcd01da175 100644 --- a/src/nuclide_header.F90 +++ b/src/nuclide_header.F90 @@ -6,7 +6,8 @@ module nuclide_header use algorithm, only: sort, find, binary_search use constants use dict_header, only: DictIntInt, DictCharInt - use endf, only: reaction_name, is_fission, is_disappearance + use endf, only: reaction_name, is_fission, is_disappearance, & + is_inelastic_scatter use endf_header, only: Function1D, Polynomial, Tabulated1D use error use hdf5_interface @@ -529,12 +530,7 @@ contains ! Add the reaction index to the scattering array if this is an inelastic ! scatter reaction - if (MTs % data(i) /= N_FISSION .and. MTs % data(i) /= N_F .and. & - MTs % data(i) /= N_NF .and. MTs % data(i) /= N_2NF .and. & - MTs % data(i) /= N_3NF .and. MTs % data(i) < 200 .and. & - MTs % data(i) /= N_LEVEL .and. MTs % data(i) /= ELASTIC .and. & - .not. this % reactions(i) % redundant) then - + if (is_inelastic_scatter(MTs % data(i))) then call index_inelastic_scatter % push_back(i) end if