Add partial cross-sections to accumulated cross-sections
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | size_ |
number of open basis levels (defines the size of both arrays) |
||
real(kind=dp), | intent(in) | :: | partial_(size_*size_) |
array holding partial cross-sections |
||
real(kind=dp), | intent(inout) | :: | accumulated_(size_*size_) |
array holding accumulated cross-sections |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=int32), | private | :: | cross_section_index_ | ||||
integer(kind=int32), | private | :: | index_1_ | ||||
integer(kind=int32), | private | :: | index_2_ |
subroutine add_cross_sections(size_, partial_, accumulated_)
!! Add partial cross-sections to accumulated cross-sections
!---------------------------------------------------------------------!
integer(int32), intent(in) :: size_
!! number of open basis levels (defines the size of both arrays)
real(dp), intent(in) :: partial_(size_*size_)
!! array holding partial cross-sections
real(dp), intent(inout) :: accumulated_(size_*size_)
!! array holding accumulated cross-sections
!---------------------------------------------------------------------!
integer(int32) :: index_1_, index_2_, cross_section_index_
!---------------------------------------------------------------------!
do index_1_ = 1, size_
do index_2_ = 1, size_
cross_section_index_ = (index_1_-1) * size_ + index_2_
accumulated_(cross_section_index_) = &
accumulated_(cross_section_index_) &
+ partial_(cross_section_index_)
enddo
enddo
!---------------------------------------------------------------------!
end subroutine add_cross_sections