Store neutron rate in neutron
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=Float64), | intent(in) | :: | rate | Neutron rate [neutrons/sec] |
||
integer, | intent(in), | optional | :: | orbit_class | Orbit class ID |
subroutine store_neutrons(rate, orbit_class)
!+ Store neutron rate in [[libfida:neutron]]
real(Float64), intent(in) :: rate
!+ Neutron rate [neutrons/sec]
integer, intent(in), optional :: orbit_class
!+ Orbit class ID
integer :: iclass
if(present(orbit_class)) then
iclass = min(orbit_class,particles%nclass)
else
iclass = 1
endif
!$OMP ATOMIC UPDATE
neutron%rate(iclass)= neutron%rate(iclass) + rate
!$OMP END ATOMIC
end subroutine store_neutrons