checks if the calculated sum of squares equals 1 for each channel
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | sum_of_squares(:) |
\(\sum_{\gamma'} \Bigl|{S}^{Jp}_{\gamma, \gamma'}\Bigr|^{2}\) |
(output) if .true. unitarity is fulfilled, .false. otherwise
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | channel_index |
function check_unitarity_for_each_channel(sum_of_squares) &
result(is_unitary_)
!! checks if the calculated sum of squares equals 1 for each channel
!---------------------------------------------------------------------!
real(dp), intent(in) :: sum_of_squares(:)
!! \\(\sum\_{\gamma'} \Bigl|{S}^{Jp}\_{\gamma, \gamma'}\Bigr|^{2}\\)
logical :: is_unitary_
!! (output) if .true. unitarity is fulfilled, .false. otherwise
!---------------------------------------------------------------------!
integer :: channel_index
!---------------------------------------------------------------------!
is_unitary_ = .true.
do channel_index = 1, size(sum_of_squares)
if (abs(sum_of_squares(channel_index) - 1.0_dp) > unitary_tolerance) then
is_unitary_ = .false.
exit
endif
end do
!---------------------------------------------------------------------!
end function check_unitarity_for_each_channel