Sum the contributions to the cross-section from S-matrix components
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | init_indices_(:) |
indices pointing to basis element involving initial state |
||
integer(kind=int32), | intent(in) | :: | final_indices_(:) |
indices pointing to basis element involving final state |
||
real(kind=dp), | intent(in) | :: | s_matrix_real_(:,:) |
real and imaginary parts of the S-matrix |
||
real(kind=dp), | intent(in) | :: | s_matrix_imag_(:,:) |
real and imaginary parts of the S-matrix |
||
integer(kind=int32), | intent(in) | :: | channel_l_values_(:) |
holds all values of l |
(output) contribution to the cross-section from S-matrix components
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=int32), | private | :: | final_index_ | ||||
integer(kind=int32), | private | :: | initial_index_ | ||||
integer(kind=int32), | private | :: | l_final_ | ||||
integer(kind=int32), | private | :: | l_initial_ | ||||
real(kind=dp), | private | :: | term_imag_ | ||||
real(kind=dp), | private | :: | term_real_ | ||||
real(kind=dp), | private | :: | term_squared_ |
function sum_cross_section_contributions(init_indices_, final_indices_, &
s_matrix_real_, s_matrix_imag_, channel_l_values_) result(sum_contributions_)
!! Sum the contributions to the cross-section from S-matrix components
!---------------------------------------------------------------------!
integer(int32), intent(in) :: init_indices_(:)
!! indices pointing to basis element involving initial state
integer(int32), intent(in) :: final_indices_(:)
!! indices pointing to basis element involving final state
integer(int32), intent(in) :: channel_l_values_(:)
!! holds all values of l
real(dp), intent(in) :: s_matrix_real_(:,:), s_matrix_imag_(:,:)
!! real and imaginary parts of the S-matrix
real(dp) :: sum_contributions_
!! (output) contribution to the cross-section from S-matrix components
!---------------------------------------------------------------------!
integer(int32) :: initial_index_, final_index_, l_initial_, l_final_
real(dp) :: term_real_, term_imag_, term_squared_
!---------------------------------------------------------------------!
sum_contributions_ = 0.0_dp
do initial_index_ = 1, size(init_indices_)
l_initial_ = channel_l_values_(init_indices_(initial_index_))
do final_index_ = 1, size(final_indices_)
l_final_ = channel_l_values_(final_indices_(final_index_))
term_real_ = compute_real_component( &
init_indices_(initial_index_), final_indices_(final_index_), &
l_initial_, l_final_, s_matrix_real_)
term_imag_ = compute_imag_component( &
init_indices_(initial_index_), final_indices_(final_index_), &
s_matrix_imag_)
term_squared_ = term_real_**2.0_dp + term_imag_**2.0_dp
sum_contributions_ = sum_contributions_ + term_squared_
end do
end do
end function sum_cross_section_contributions