pes_matrix_mod Module

This module provides functions calculating the algebraic coefficients \( g_{{\lambda},\gamma,\gamma'}^{Jp} \) entering the PES matrix, and the full PES matrix (see Eq. 1 in the "Coupling Matrix" section).

Subroutines preparing algebraic coefficients and determining the number of non-zero terms of the PES matrix are called only once, before Numerov propagator is initialized

Subroutines calculating the full PES matrix at desired \(R\) are called within the propagator loop

The data is organized as follows:

  • number of non-zero terms of the PES matrix due to \(\bar{\Omega} = \bar{\Omega}'\) condition is saved as "number_of_nonzero_pes_matrix_elements"

  • number of non-vanishing terms in the sum over \(\lambda\) in Eq. 1 in the "Coupling Matrix" section is saved in a "nonzero_terms_per_element" array which is of "number_of_nonzero_pes_matrix_elements" size

  • a total number of non-vanishing \( g_{{\lambda},\gamma,\gamma'}^{Jp} \) coefficients is saved in "number_of_nonzero_algebraic_coefficients"

  • all non-vanishing \( g_{{\lambda},\gamma,\gamma'}^{Jp} \) coefficients are saved in "nonzero_algebraic_coefficients" array, which is of "number_of_nonzero_algebraic_coefficients" size

  • corresponding \(\lambda\) value for each non-vanishing coefficient is saved as an index to "legendre_indices" in the "nonzero_legendre_indices" array (which is of "number_of_nonzero_algebraic_coefficients" size)


Uses

  • module~~pes_matrix_mod~~UsesGraph module~pes_matrix_mod pes_matrix_mod module~physics_utilities_mod physics_utilities_mod module~pes_matrix_mod->module~physics_utilities_mod module~radial_coupling_terms_mod radial_coupling_terms_mod module~pes_matrix_mod->module~radial_coupling_terms_mod iso_fortran_env iso_fortran_env module~pes_matrix_mod->iso_fortran_env module~math_utilities_mod math_utilities_mod module~pes_matrix_mod->module~math_utilities_mod module~array_operations_mod array_operations_mod module~pes_matrix_mod->module~array_operations_mod module~global_variables_mod global_variables_mod module~pes_matrix_mod->module~global_variables_mod module~utility_functions_mod utility_functions_mod module~pes_matrix_mod->module~utility_functions_mod module~physics_utilities_mod->iso_fortran_env module~physics_utilities_mod->module~array_operations_mod module~physics_utilities_mod->module~global_variables_mod module~physics_utilities_mod->module~utility_functions_mod module~radial_coupling_terms_mod->iso_fortran_env module~radial_coupling_terms_mod->module~math_utilities_mod module~radial_coupling_terms_mod->module~global_variables_mod module~radial_coupling_terms_mod->module~utility_functions_mod module~math_utilities_mod->iso_fortran_env module~math_utilities_mod->module~utility_functions_mod module~special_functions_mod special_functions_mod module~math_utilities_mod->module~special_functions_mod module~array_operations_mod->iso_fortran_env module~global_variables_mod->iso_fortran_env module~utility_functions_mod->iso_fortran_env

Used by

  • module~~pes_matrix_mod~~UsedByGraph module~pes_matrix_mod pes_matrix_mod module~propagator_mod propagator_mod module~propagator_mod->module~pes_matrix_mod program~scattering SCATTERING program~scattering->module~pes_matrix_mod program~scattering->module~propagator_mod

Contents


Functions

private function calculate_single_pes_matrix_element(intermolecular_distance_, channel_index_1_, channel_index_2_, channel_indices_, count_nonzero_legendre_terms, count_nonzero_algebraic_coefficients_, nonzero_legendre_indices_, nonzero_algebraic_coefficients_) result(matrix_element_)

Implementation of Eq. 1 in "Coupling Matrix" section; diagonal contribution from wavevectors (see the last term in Eq. 3 of "What are coupled equations" section) is added

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: intermolecular_distance_

intermolecular distance

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

indices identifying matrix element

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

indices identifying matrix element

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

holds the indices pointing to the basis arrays

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

number of non-zero terms in Legendre expansion for a single matrix element of the interaction potential

integer(kind=int32), intent(inout) :: count_nonzero_algebraic_coefficients_

running index counting non-zero coupling coefficients, \( g_{{\lambda},\gamma,\gamma'}^{Jp} \) in the whole matrix; incremented in this subroutine

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

holds indices pointing to legendre_indices, which correspond to the non-vanishing elements of the sum over \(\lambda\) for each non-zero element of the pes matrix;

real(kind=dp), intent(in) :: nonzero_algebraic_coefficients_(:)

holds the values of the non-zero algebraic coefficients

Return Value real(kind=dp)

matirx element of the interaction potential contribution to the coupling matrix


Subroutines

public subroutine calculate_pes_matrix(total_angular_momentum_, intermolecular_distance_, channel_indices_, channels_omega_values_, nonzero_terms_per_element_, nonzero_legendre_indices_, nonzero_algebraic_coefficients_, vmatrix)

calculates the contribution to the coupling matrix from the the interaction potential (PES); see Eq. 1 in "Coupling Matrix" section; diagonal contribution from wavevectors (see the last term in Eq. 3 of "What are coupled equations" section) is added

Arguments

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

total angular momentum

real(kind=dp), intent(in) :: intermolecular_distance_

intermolecular distance

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(in) :: nonzero_terms_per_element_(:)

keeps the number of non-vanishing elements of the sum over \(\lambda\) for each non-zero element of the pes matrix

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

holds indices pointing to legendre_indices, which correspond to the non-vanishing elements of the sum over \(\lambda\) for each non-zero element of the pes matrix;

real(kind=dp), intent(in) :: nonzero_algebraic_coefficients_(:)

holds the values of the non-zero algebraic coefficients

real(kind=dp), intent(out) :: vmatrix(:,:)

(output) - the interaction potential contribution to the pes matrix

public subroutine initialize_pes_matrix(channel_indices, channels_omega_values, nonzero_terms_per_element, nonzero_legendre_indices, nonzero_algebraic_coefficients)

launches "check_nonzero_pes_matrix_elements" and "prepare_pes_matrix_elements" subroutines; called from the main program

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(inout), allocatable :: nonzero_terms_per_element(:)

keeps the number of non-vanishing elements of the sum over \(\lambda\) for each non-zero element of the PES matrix

integer(kind=int32), intent(inout), allocatable :: nonzero_legendre_indices(:)

holds indices pointing to legendre_indices, which correspond to the non-vanishing elements of the sum over \(\lambda\) for each non-zero element of the PES matrix;

real(kind=dp), intent(inout), allocatable :: nonzero_algebraic_coefficients(:)

holds the values of the non-zero algebraic coefficients

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

private subroutine prepare_pes_matrix_elements(channel_indices, channels_omega_values, nonzero_terms_per_element, nonzero_legendre_indices, nonzero_algebraic_coefficients)

-- nonzero_terms_per_element - number of non-vanishing terms in the sum over \(\lambda\) in Eq. 1 in the "Coupling Matrix" section -- nonzero_legendre_indices - corresponding \(\lambda\) value for each non-vanishing coefficient is saved as an index to "legendre_indices" -- nonzero_algebraic_coefficients -- holds all non-vanishing \( g_{{\lambda},\gamma,\gamma'}^{Jp} \) 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(inout) :: nonzero_terms_per_element(:)

keeps the number of non-vanishing elements of the sum over \(\lambda\) for each non-zero element of the PES matrix

integer(kind=int32), intent(inout) :: nonzero_legendre_indices(:)

holds indices pointing to legendre_indices, which correspond to the non-vanishing elements of the sum over \(\lambda\) for each non-zero element of the PES matrix;

real(kind=dp), intent(inout) :: nonzero_algebraic_coefficients(:)

holds the values of the non-zero algebraic coefficients

private subroutine print_pes_matrix_elements_summary(number_of_channels, number_of_nonzero_pes_matrix_elements, number_of_nonzero_algebraic_coefficients)

print a shor summary on the number of non-zero matrix elements of the PES matrix

Arguments

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

size of the basis

integer(kind=int32), intent(in) :: 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(in) :: number_of_nonzero_algebraic_coefficients

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

private subroutine process_single_matrix_element(j_, j_prime_, omega_, count_nonzero_algebraic_coefficients, count_nonzero_legendre_terms, nonzero_legendre_indices, nonzero_algebraic_coefficients)

calculates the non-zero algebraic coefficients \( g_{{\lambda},\gamma,\gamma'}^{Jp} \) for a single matrix element - see Eq. (1) in the "Coupling matrix" section; algebraic coefficients are saved to nonzero_algebraic_coefficients array; corresponding indices to legendre_indices are saved to nonzero_legendre_indices array

Arguments

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

pre-collisional rotational angular momentum

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

post-collisional rotational angular momentum

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

\(\bar{\Omega}\)

integer(kind=int32), intent(inout) :: count_nonzero_algebraic_coefficients

running index counting non-zero coupling coefficients, \( g_{{\lambda},\gamma,\gamma'}^{Jp} \) in the whole matrix; incremented in this subroutine

integer(kind=int32), intent(inout) :: count_nonzero_legendre_terms

number of non-zero terms in Legendre expansion for a single matrix element of the interaction potential

integer(kind=int32), intent(inout) :: nonzero_legendre_indices(:)

holds indices pointing to legendre_indices, which correspond to the non-vanishing elements of the sum over \(\lambda\) for each non-zero element of the PES matrix;

real(kind=dp), intent(inout) :: nonzero_algebraic_coefficients(:)

holds values of the non-zero algebraic coefficients