calculates a single space-fixed matrix element from Eq. (2) in "Solution of coupled equations"
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=int32), | intent(in) | :: | number_of_channels |
size of the basis |
||
integer(kind=int32), | intent(in) | :: | total_angular_momentum_ |
total angular momentum |
||
integer(kind=int32), | intent(in) | :: | v_ |
vibrational and rotational quantum numbers |
||
integer(kind=int32), | intent(in) | :: | j_ |
vibrational and rotational quantum numbers |
||
integer(kind=int32), | intent(in) | :: | vp_ |
vibrational and rotational quantum numbers |
||
integer(kind=int32), | intent(in) | :: | jp_ |
vibrational and rotational quantum numbers |
||
integer(kind=int32), | intent(in) | :: | l_ |
orbital angular momenta |
||
integer(kind=int32), | intent(in) | :: | lp_ |
orbital angular momenta |
||
integer(kind=int32), | intent(in) | :: | channel_indices(number_of_channels) |
holds the indices pointing to the basis arrays |
||
integer(kind=int32), | intent(in) | :: | channels_omega_values(number_of_channels) |
holds all values of \bar{\Omega} |
||
real(kind=dp), | intent(in) | :: | bf_matrix(number_of_channels,number_of_channels) |
matrix in the BF frame |
||
real(kind=dp), | intent(out) | :: | sf_element |
(output) matrix element in the SF frame |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=int32), | private | :: | channel_index_1_ | ||||
integer(kind=int32), | private | :: | channel_index_2_ | ||||
real(kind=dp), | private | :: | p_coeff_inner | ||||
real(kind=dp), | private | :: | p_coeff_outer | ||||
real(kind=dp), | private | :: | sum_inner | ||||
real(kind=dp), | private | :: | sum_outer |
subroutine calculate_single_SF_element(number_of_channels, &
total_angular_momentum_, v_, j_, vp_, jp_, l_, lp_, &
channel_indices, channels_omega_values, bf_matrix, sf_element)
!! calculates a single space-fixed matrix element from Eq. (2) in
!! "Solution of coupled equations"
!---------------------------------------------------------------------!
integer(int32), intent(in) :: number_of_channels
!! size of the basis
integer(int32), intent(in) :: total_angular_momentum_
!! total angular momentum
integer(int32), intent(in) :: v_, j_, vp_, jp_
!! vibrational and rotational quantum numbers
integer(int32), intent(in) :: l_, lp_
!! orbital angular momenta
integer(int32), intent(in) :: channel_indices(number_of_channels)
!! holds the indices pointing to the basis arrays
integer(int32), intent(in) :: channels_omega_values(number_of_channels)
!! holds all values of \bar{\Omega}
real(dp), intent(in) :: bf_matrix(number_of_channels, number_of_channels)
!! matrix in the BF frame
real(dp), intent(out) :: sf_element
!! (output) matrix element in the SF frame
!---------------------------------------------------------------------!
integer(int32) :: channel_index_1_, channel_index_2_
real(dp) :: p_coeff_outer, p_coeff_inner, sum_outer, sum_inner
!---------------------------------------------------------------------!
sum_outer = 0.0_dp
do channel_index_1_ = 1, number_of_channels
if (vib_levels(channel_indices(channel_index_1_)) /= v_ .or. &
rot_levels(channel_indices(channel_index_1_)) /= j_) cycle
p_coeff_outer = p_coeff(total_angular_momentum_, j_, l_, &
channels_omega_values(channel_index_1_))
sum_inner = 0.0_dp
do channel_index_2_ = 1, number_of_channels
if (vib_levels(channel_indices(channel_index_2_)) /= vp_ .or. &
rot_levels(channel_indices(channel_index_2_)) /= jp_) cycle
p_coeff_inner = p_coeff(total_angular_momentum_, jp_, lp_, &
channels_omega_values(channel_index_2_))
sum_inner = sum_inner + p_coeff_inner &
* bf_matrix(channel_index_1_,channel_index_2_)
end do
sum_outer = sum_outer + p_coeff_outer * sum_inner
end do
sf_element = sum_outer
!---------------------------------------------------------------------!
end subroutine calculate_single_SF_element