check_nonzero_pes_matrix_elements Subroutine

private subroutine check_nonzero_pes_matrix_elements(channel_indices, channels_omega_values, number_of_nonzero_pes_matrix_elements, number_of_nonzero_algebraic_coefficients)

checks the number of non-zero PES matrix elements due to the \bar{\Omega} = \bar{\Omega}' condition, "number_of_nonzero_pes_matrix_elements", and the total number of non-zero algebraic coefficients, \( g_{{\lambda},\gamma,\gamma'}^{Jp} \), in the whole matrix, "number_of_nonzero_algebraic_coefficients".

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(in) :: channel_indices(:)

holds the indices pointing to the basis arrays

integer(kind=int32), intent(in) :: channels_omega_values(:)

holds all values of \bar{\Omega}

integer(kind=int32), intent(out) :: number_of_nonzero_pes_matrix_elements

number of non-zero terms in the sum () for each non-zero element of the PES matrix

integer(kind=int32), intent(out) :: number_of_nonzero_algebraic_coefficients

number of all non-zero algberaix coefficients in the whole PES matrix


Calls

proc~~check_nonzero_pes_matrix_elements~~CallsGraph proc~check_nonzero_pes_matrix_elements check_nonzero_pes_matrix_elements proc~zero_projections_3j_condition zero_projections_3j_condition proc~check_nonzero_pes_matrix_elements->proc~zero_projections_3j_condition proc~triangle_inequality_holds triangle_inequality_holds proc~zero_projections_3j_condition->proc~triangle_inequality_holds proc~is_sum_even is_sum_even proc~zero_projections_3j_condition->proc~is_sum_even

Called by

proc~~check_nonzero_pes_matrix_elements~~CalledByGraph proc~check_nonzero_pes_matrix_elements check_nonzero_pes_matrix_elements proc~initialize_pes_matrix initialize_pes_matrix proc~initialize_pes_matrix->proc~check_nonzero_pes_matrix_elements program~scattering SCATTERING program~scattering->proc~initialize_pes_matrix

Contents


Variables

Type Visibility Attributes Name Initial
integer(kind=int32), private :: channel_index_1_
integer(kind=int32), private :: channel_index_2_
integer(kind=int32), private :: count_nonzero_algebraic_coefficients
integer(kind=int32), private :: count_nonzero_pes_matrix_elements
integer(kind=int32), private :: j_
integer(kind=int32), private :: j_prime_
integer(kind=int32), private :: lambda_
integer(kind=int32), private :: legendre_term_index_
integer(kind=int32), private :: omega_
integer(kind=int32), private :: omega_prime_

Source Code

      subroutine check_nonzero_pes_matrix_elements(channel_indices,            &
         channels_omega_values, number_of_nonzero_pes_matrix_elements,         &
         number_of_nonzero_algebraic_coefficients)
         !! checks the number of non-zero PES matrix elements due to
         !! the \bar{\Omega} = \bar{\Omega}' condition,
         !! "number_of_nonzero_pes_matrix_elements",
         !! and the total number of non-zero algebraic coefficients,
         !! \\( g\_{{\lambda},\gamma,\gamma'}^{Jp} \\), in the whole matrix,
         !! "number_of_nonzero_algebraic_coefficients".
         !---------------------------------------------------------------------!
         integer(int32), intent(in) :: channel_indices(:)
            !! holds the indices pointing to the basis arrays
         integer(int32), intent(in) :: channels_omega_values(:)
            !! holds all values of \bar{\Omega}
         integer(int32), intent(out) :: number_of_nonzero_pes_matrix_elements
            !! number of non-zero terms in the sum ()
            !! for each non-zero element of the PES matrix
         integer(int32), intent(out) :: number_of_nonzero_algebraic_coefficients
            !! number of all non-zero algberaix coefficients in
            !! the whole PES matrix
         !---------------------------------------------------------------------!
         integer(int32) :: count_nonzero_pes_matrix_elements,                  &
            count_nonzero_algebraic_coefficients, j_, j_prime_, omega_,        &
            omega_prime_, lambda_, channel_index_1_, channel_index_2_,         &
            legendre_term_index_
         !---------------------------------------------------------------------!
         count_nonzero_algebraic_coefficients = 0
         count_nonzero_pes_matrix_elements = 0
         do channel_index_1_ = 1, size(channel_indices)
            j_ = rot_levels(channel_indices(channel_index_1_))
            omega_ = channels_omega_values(channel_index_1_)
            do channel_index_2_ = 1, channel_index_1_
               j_prime_ = rot_levels(channel_indices(channel_index_2_))
               omega_prime_ = channels_omega_values(channel_index_2_)
               !---------------------------------------------------------------!
               if (omega_ /= omega_prime_) cycle
               !---------------------------------------------------------------!
               count_nonzero_pes_matrix_elements =                             &
                  count_nonzero_pes_matrix_elements + 1
               do legendre_term_index_ = 1, number_of_legendre_indices
                  lambda_ = legendre_indices(legendre_term_index_)
                  if (.not. zero_projections_3j_condition(j_, j_prime_, lambda_)) cycle
                  count_nonzero_algebraic_coefficients =                       &
                     count_nonzero_algebraic_coefficients+1            
              enddo
            enddo
         enddo
         !---------------------------------------------------------------------!
         number_of_nonzero_algebraic_coefficients                              &
            = count_nonzero_algebraic_coefficients
         number_of_nonzero_pes_matrix_elements                                 &
            = count_nonzero_pes_matrix_elements
         !---------------------------------------------------------------------!
      end subroutine check_nonzero_pes_matrix_elements