launches "check_nonzero_pes_matrix_elements" and "prepare_pes_matrix_elements" subroutines; called from the main program
Type | Intent | Optional | 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 |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=int32), | private | :: | number_of_channels | ||||
integer(kind=int32), | private | :: | number_of_nonzero_algebraic_coefficients | ||||
integer(kind=int32), | private | :: | number_of_nonzero_pes_matrix_elements | ||||
real(kind=dp), | private | :: | time_start_ | ||||
real(kind=dp), | private | :: | time_stop_ | ||||
real(kind=dp), | private | :: | total_time_ |
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
!---------------------------------------------------------------------!
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(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(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(dp), intent(inout), allocatable :: nonzero_algebraic_coefficients(:)
!! holds the values of the non-zero algebraic coefficients
!---------------------------------------------------------------------!
integer(int32) :: number_of_channels, &
number_of_nonzero_pes_matrix_elements, &
number_of_nonzero_algebraic_coefficients
real(dp) :: time_start_, time_stop_, total_time_
!---------------------------------------------------------------------!
call cpu_time(time_start_)
!---------------------------------------------------------------------!
call check_nonzero_pes_matrix_elements(channel_indices, &
channels_omega_values, number_of_nonzero_pes_matrix_elements, &
number_of_nonzero_algebraic_coefficients)
!---------------------------------------------------------------------!
call allocate_1d(nonzero_terms_per_element, &
number_of_nonzero_pes_matrix_elements)
call allocate_1d(nonzero_algebraic_coefficients, &
number_of_nonzero_algebraic_coefficients)
call allocate_1d(nonzero_legendre_indices, &
number_of_nonzero_algebraic_coefficients)
!---------------------------------------------------------------------!
call prepare_pes_matrix_elements(channel_indices, &
channels_omega_values, nonzero_terms_per_element, &
nonzero_legendre_indices, nonzero_algebraic_coefficients)
!---------------------------------------------------------------------!
call cpu_time(time_stop_)
!---------------------------------------------------------------------!
if (print_level.ge.2) then
!------------------------------------------------------------------!
number_of_channels = size(channel_indices)
call print_pes_matrix_elements_summary( &
number_of_channels, number_of_nonzero_pes_matrix_elements, &
number_of_nonzero_algebraic_coefficients)
!------------------------------------------------------------------!
call time_count_summary(time_start_, time_stop_, total_time_, &
"-- PES matrix initialization completed in ")
!------------------------------------------------------------------!
endif
!---------------------------------------------------------------------!
end subroutine initialize_pes_matrix