SCATTERING Program

Uses

  • program~~scattering~~UsesGraph program~scattering SCATTERING module~channels_mod channels_mod program~scattering->module~channels_mod module~physics_utilities_mod physics_utilities_mod program~scattering->module~physics_utilities_mod module~propagator_mod propagator_mod program~scattering->module~propagator_mod module~pes_matrix_mod pes_matrix_mod program~scattering->module~pes_matrix_mod module~array_operations_mod array_operations_mod program~scattering->module~array_operations_mod module~radial_coupling_terms_mod radial_coupling_terms_mod program~scattering->module~radial_coupling_terms_mod module~unitarity_check_mod unitarity_check_mod program~scattering->module~unitarity_check_mod iso_fortran_env iso_fortran_env program~scattering->iso_fortran_env module~save_s_matrix_mod save_s_matrix_mod program~scattering->module~save_s_matrix_mod module~boundary_conditions_mod boundary_conditions_mod program~scattering->module~boundary_conditions_mod module~global_variables_mod global_variables_mod program~scattering->module~global_variables_mod module~utility_functions_mod utility_functions_mod program~scattering->module~utility_functions_mod module~state_to_state_cross_sections_mod state_to_state_cross_sections_mod program~scattering->module~state_to_state_cross_sections_mod module~input_reader_mod input_reader_mod program~scattering->module~input_reader_mod module~channels_mod->module~physics_utilities_mod module~channels_mod->iso_fortran_env module~channels_mod->module~global_variables_mod module~channels_mod->module~utility_functions_mod module~physics_utilities_mod->module~array_operations_mod module~physics_utilities_mod->iso_fortran_env module~physics_utilities_mod->module~global_variables_mod module~physics_utilities_mod->module~utility_functions_mod module~propagator_mod->module~physics_utilities_mod module~propagator_mod->module~pes_matrix_mod module~propagator_mod->module~array_operations_mod module~propagator_mod->iso_fortran_env module~propagator_mod->module~global_variables_mod module~propagator_mod->module~utility_functions_mod module~centrifugal_matrix_mod centrifugal_matrix_mod module~propagator_mod->module~centrifugal_matrix_mod module~pes_matrix_mod->module~physics_utilities_mod module~pes_matrix_mod->module~array_operations_mod module~pes_matrix_mod->module~radial_coupling_terms_mod module~pes_matrix_mod->iso_fortran_env module~pes_matrix_mod->module~global_variables_mod module~pes_matrix_mod->module~utility_functions_mod module~math_utilities_mod math_utilities_mod module~pes_matrix_mod->module~math_utilities_mod module~array_operations_mod->iso_fortran_env module~radial_coupling_terms_mod->iso_fortran_env module~radial_coupling_terms_mod->module~global_variables_mod module~radial_coupling_terms_mod->module~utility_functions_mod module~radial_coupling_terms_mod->module~math_utilities_mod module~unitarity_check_mod->iso_fortran_env module~unitarity_check_mod->module~global_variables_mod module~unitarity_check_mod->module~utility_functions_mod module~save_s_matrix_mod->iso_fortran_env module~save_s_matrix_mod->module~global_variables_mod module~save_s_matrix_mod->module~utility_functions_mod module~boundary_conditions_mod->module~physics_utilities_mod module~boundary_conditions_mod->module~array_operations_mod module~boundary_conditions_mod->iso_fortran_env module~boundary_conditions_mod->module~global_variables_mod module~boundary_conditions_mod->module~math_utilities_mod fwigxjpf fwigxjpf module~boundary_conditions_mod->fwigxjpf module~global_variables_mod->iso_fortran_env module~utility_functions_mod->iso_fortran_env module~state_to_state_cross_sections_mod->module~physics_utilities_mod module~state_to_state_cross_sections_mod->module~array_operations_mod module~state_to_state_cross_sections_mod->iso_fortran_env module~state_to_state_cross_sections_mod->module~global_variables_mod module~state_to_state_cross_sections_mod->module~utility_functions_mod module~input_reader_mod->module~physics_utilities_mod module~input_reader_mod->module~array_operations_mod module~input_reader_mod->iso_fortran_env module~input_reader_mod->module~global_variables_mod module~input_reader_mod->module~utility_functions_mod module~input_validation input_validation module~input_reader_mod->module~input_validation module~centrifugal_matrix_mod->module~array_operations_mod module~centrifugal_matrix_mod->iso_fortran_env module~centrifugal_matrix_mod->module~global_variables_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~input_validation->iso_fortran_env module~input_validation->module~global_variables_mod module~input_validation->module~utility_functions_mod
                 the SCATTERING code - version 0.0.1
               optimized for diatom-atom calculations
                            25-01-2024
                            H. Jozwiak

Please, refer to this version of the code by citing the following paper H. Jozwiak, F. Thibault, A. Viel, P. Wcislo, F. Lique, Rovibrational (de-)excitation of H2 by He revisited https://doi.org/10.48550/arXiv.2311.09890


Calls

program~~scattering~~CallsGraph program~scattering SCATTERING proc~print_channels print_channels program~scattering->proc~print_channels proc~calculate_sf_matrix_from_bf_matrix calculate_sf_matrix_from_bf_matrix program~scattering->proc~calculate_sf_matrix_from_bf_matrix proc~determine_largest_cross_sections determine_largest_cross_sections program~scattering->proc~determine_largest_cross_sections proc~calculate_s_matrix calculate_s_matrix program~scattering->proc~calculate_s_matrix proc~set_body_fixed_channels set_body_fixed_channels program~scattering->proc~set_body_fixed_channels proc~read_input_file read_input_file program~scattering->proc~read_input_file proc~units_conversion units_conversion program~scattering->proc~units_conversion proc~calculate_k_matrix calculate_k_matrix program~scattering->proc~calculate_k_matrix proc~add_cross_sections add_cross_sections program~scattering->proc~add_cross_sections proc~print_cross_sections_for_jtot print_cross_sections_for_jtot program~scattering->proc~print_cross_sections_for_jtot fwig_temp_free fwig_temp_free program~scattering->fwig_temp_free proc~set_number_of_channels set_number_of_channels program~scattering->proc~set_number_of_channels proc~print_largest_partial_cross_sections print_largest_partial_cross_sections program~scattering->proc~print_largest_partial_cross_sections proc~write_message write_message program~scattering->proc~write_message proc~calculate_number_of_steps calculate_number_of_steps program~scattering->proc~calculate_number_of_steps fwig_table_init fwig_table_init program~scattering->fwig_table_init proc~read_radial_coupling_terms read_radial_coupling_terms program~scattering->proc~read_radial_coupling_terms proc~no_open_channels_message no_open_channels_message program~scattering->proc~no_open_channels_message proc~save_partial_xs_file_header save_partial_xs_file_header program~scattering->proc~save_partial_xs_file_header proc~time_count_summary time_count_summary program~scattering->proc~time_count_summary proc~prepare_wavevector_array prepare_wavevector_array program~scattering->proc~prepare_wavevector_array interface~allocate_2d allocate_2d program~scattering->interface~allocate_2d proc~numerov numerov program~scattering->proc~numerov interface~append append program~scattering->interface~append proc~print_final_unitarity_warning print_final_unitarity_warning program~scattering->proc~print_final_unitarity_warning fwig_table_free fwig_table_free program~scattering->fwig_table_free proc~count_open_basis_levels count_open_basis_levels program~scattering->proc~count_open_basis_levels proc~print_short_block_summary print_short_block_summary program~scattering->proc~print_short_block_summary interface~allocate_1d allocate_1d program~scattering->interface~allocate_1d proc~initialize_pes_matrix initialize_pes_matrix program~scattering->proc~initialize_pes_matrix proc~print_final_cross_sections print_final_cross_sections program~scattering->proc~print_final_cross_sections fwig_temp_init fwig_temp_init program~scattering->fwig_temp_init proc~reduce_radial_coupling_terms reduce_radial_coupling_terms program~scattering->proc~reduce_radial_coupling_terms proc~interpolate_radial_coupling_terms interpolate_radial_coupling_terms program~scattering->proc~interpolate_radial_coupling_terms proc~save_open_basis_levels save_open_basis_levels program~scattering->proc~save_open_basis_levels proc~set_space_fixed_channels set_space_fixed_channels program~scattering->proc~set_space_fixed_channels proc~save_s_matrix_block_info save_s_matrix_block_info program~scattering->proc~save_s_matrix_block_info proc~unitarity_check unitarity_check program~scattering->proc~unitarity_check proc~write_header write_header program~scattering->proc~write_header proc~save_s_matrix_file_header save_s_matrix_file_header program~scattering->proc~save_s_matrix_file_header proc~initialize_cross_section_arrays initialize_cross_section_arrays program~scattering->proc~initialize_cross_section_arrays proc~count_open_channels_in_block count_open_channels_in_block program~scattering->proc~count_open_channels_in_block proc~calculate_largest_wavevector calculate_largest_wavevector program~scattering->proc~calculate_largest_wavevector proc~calculate_state_to_state_cross_section calculate_state_to_state_cross_section program~scattering->proc~calculate_state_to_state_cross_section proc~save_partial_xs_single_block save_partial_xs_single_block program~scattering->proc~save_partial_xs_single_block proc~check_cross_section_thresholds check_cross_section_thresholds program~scattering->proc~check_cross_section_thresholds proc~print_channels->proc~write_message proc~write_channel_line write_channel_line proc~print_channels->proc~write_channel_line proc~is_open is_open proc~print_channels->proc~is_open proc~wavevector_squared_from_energy wavevector_squared_from_energy proc~print_channels->proc~wavevector_squared_from_energy proc~calculate_single_sf_element calculate_single_SF_element proc~calculate_sf_matrix_from_bf_matrix->proc~calculate_single_sf_element interface~invert_symmetric_matrix invert_symmetric_matrix proc~calculate_s_matrix->interface~invert_symmetric_matrix dgemm dgemm proc~calculate_s_matrix->dgemm interface~fill_symmetric_matrix fill_symmetric_matrix proc~calculate_s_matrix->interface~fill_symmetric_matrix proc~update_body_fixed_channels_info update_body_fixed_channels_info proc~set_body_fixed_channels->proc~update_body_fixed_channels_info proc~read_input_file->proc~write_message proc~read_input_file->interface~allocate_1d proc~check_namelist_input check_namelist_input proc~read_input_file->proc~check_namelist_input proc~check_namelist_basis check_namelist_basis proc~read_input_file->proc~check_namelist_basis proc~file_io_status file_io_status proc~read_input_file->proc~file_io_status proc~input_summary input_summary proc~read_input_file->proc~input_summary interface~allocate_3d allocate_3d proc~read_input_file->interface~allocate_3d proc~check_namelist_potential check_namelist_potential proc~read_input_file->proc~check_namelist_potential proc~to_lowercase to_lowercase proc~read_input_file->proc~to_lowercase proc~calculate_k_matrix->proc~is_open proc~riccati_bessel_j riccati_bessel_j proc~calculate_k_matrix->proc~riccati_bessel_j proc~modified_bessel_k_ratio modified_bessel_k_ratio proc~calculate_k_matrix->proc~modified_bessel_k_ratio proc~calculate_k_matrix->proc~wavevector_squared_from_energy proc~calculate_k_matrix->dgemm dgesv dgesv proc~calculate_k_matrix->dgesv proc~riccati_bessel_y riccati_bessel_y proc~calculate_k_matrix->proc~riccati_bessel_y proc~print_cross_sections_for_jtot->proc~write_message proc~float_to_character float_to_character proc~print_cross_sections_for_jtot->proc~float_to_character proc~integer_to_character integer_to_character proc~print_cross_sections_for_jtot->proc~integer_to_character proc~print_all_cross_sections print_all_cross_sections proc~print_cross_sections_for_jtot->proc~print_all_cross_sections proc~total_energy total_energy proc~print_cross_sections_for_jtot->proc~total_energy proc~calculate_number_of_channels_space_fixed calculate_number_of_channels_space_fixed proc~set_number_of_channels->proc~calculate_number_of_channels_space_fixed proc~check_number_of_channels check_number_of_channels proc~set_number_of_channels->proc~check_number_of_channels proc~calculate_number_of_channels_body_fixed calculate_number_of_channels_body_fixed proc~set_number_of_channels->proc~calculate_number_of_channels_body_fixed proc~print_basic_cross_section_info print_basic_cross_section_info proc~print_largest_partial_cross_sections->proc~print_basic_cross_section_info proc~print_detailed_cross_section_info print_detailed_cross_section_info proc~print_largest_partial_cross_sections->proc~print_detailed_cross_section_info proc~validate_r_range validate_r_range proc~read_radial_coupling_terms->proc~validate_r_range proc~read_and_validate_lambda read_and_validate_lambda proc~read_radial_coupling_terms->proc~read_and_validate_lambda proc~read_radial_coupling_terms->proc~file_io_status proc~read_potential_data read_potential_data proc~read_radial_coupling_terms->proc~read_potential_data proc~skip_header_lines skip_header_lines proc~read_radial_coupling_terms->proc~skip_header_lines proc~no_open_channels_message->proc~write_message proc~no_open_channels_message->proc~integer_to_character proc~save_partial_xs_file_header->proc~write_message proc~save_partial_xs_file_header->proc~file_io_status proc~time_count_summary->proc~write_message proc~prepare_wavevector_array->proc~is_open proc~prepare_wavevector_array->proc~wavevector_squared_from_energy proc~write_error write_error proc~prepare_wavevector_array->proc~write_error proc~numerov->proc~time_count_summary proc~initial_setup initial_setup proc~numerov->proc~initial_setup proc~handle_final_propagation_steps handle_final_propagation_steps proc~numerov->proc~handle_final_propagation_steps proc~calculate_log_der_matrix calculate_log_der_matrix proc~numerov->proc~calculate_log_der_matrix proc~propagator_summary propagator_summary proc~numerov->proc~propagator_summary proc~general_propagation_step general_propagation_step proc~numerov->proc~general_propagation_step proc~print_final_unitarity_warning->proc~write_message proc~print_final_unitarity_warning->proc~integer_to_character proc~count_open_basis_levels->proc~is_open proc~print_short_block_summary->proc~write_message proc~print_short_block_summary->proc~integer_to_character proc~initialize_pes_matrix->proc~time_count_summary proc~initialize_pes_matrix->interface~allocate_1d proc~print_pes_matrix_elements_summary print_pes_matrix_elements_summary proc~initialize_pes_matrix->proc~print_pes_matrix_elements_summary proc~prepare_pes_matrix_elements prepare_pes_matrix_elements proc~initialize_pes_matrix->proc~prepare_pes_matrix_elements proc~check_nonzero_pes_matrix_elements check_nonzero_pes_matrix_elements proc~initialize_pes_matrix->proc~check_nonzero_pes_matrix_elements proc~print_final_cross_sections->proc~write_message proc~print_final_cross_sections->proc~print_all_cross_sections proc~reduce_radial_coupling_terms->proc~write_message proc~reduce_radial_coupling_terms->proc~integer_to_character proc~print_pes_quantum_numbers print_pes_quantum_numbers proc~reduce_radial_coupling_terms->proc~print_pes_quantum_numbers proc~reduce_coupling_terms reduce_coupling_terms proc~reduce_radial_coupling_terms->proc~reduce_coupling_terms proc~spline spline proc~interpolate_radial_coupling_terms->proc~spline proc~save_open_basis_levels->interface~allocate_1d proc~save_open_basis_levels->proc~is_open proc~save_open_basis_levels->proc~wavevector_squared_from_energy proc~set_space_fixed_channels->proc~write_error proc~unitarity_check->proc~write_message proc~calculate_sum_of_squares_for_each_channel calculate_sum_of_squares_for_each_channel proc~unitarity_check->proc~calculate_sum_of_squares_for_each_channel proc~check_unitarity_for_each_channel check_unitarity_for_each_channel proc~unitarity_check->proc~check_unitarity_for_each_channel proc~handle_unitarity_output_message handle_unitarity_output_message proc~unitarity_check->proc~handle_unitarity_output_message proc~write_header->proc~write_message proc~write_header->proc~write_error interface~incorrect_value incorrect_value proc~write_header->interface~incorrect_value proc~save_s_matrix_file_header->proc~file_io_status proc~initialize_cross_section_arrays->interface~allocate_1d proc~count_open_channels_in_block->proc~is_open proc~calculate_largest_wavevector->proc~is_open proc~calculate_largest_wavevector->proc~wavevector_squared_from_energy proc~calculate_state_to_state_cross_section->proc~time_count_summary proc~compute_individual_cross_section compute_individual_cross_section proc~calculate_state_to_state_cross_section->proc~compute_individual_cross_section proc~save_partial_xs_single_block->proc~write_message proc~save_partial_xs_single_block->proc~total_energy proc~write_channel_line->proc~write_message proc~is_open->proc~total_energy proc~p_coeff p_coeff proc~calculate_single_sf_element->proc~p_coeff proc~update_channel_counts_space_fixed update_channel_counts_space_fixed proc~calculate_number_of_channels_space_fixed->proc~update_channel_counts_space_fixed proc~print_basic_cross_section_info->proc~write_message proc~print_basic_cross_section_info->proc~float_to_character proc~print_basic_cross_section_info->proc~integer_to_character proc~validate_r_range->proc~float_to_character proc~validate_r_range->proc~write_error proc~calculate_coupling_matrix calculate_coupling_matrix proc~initial_setup->proc~calculate_coupling_matrix proc~calculate_t_matrix calculate_t_matrix proc~initial_setup->proc~calculate_t_matrix proc~calculate_pes_matrix calculate_pes_matrix proc~initial_setup->proc~calculate_pes_matrix proc~calculate_u_matrix calculate_u_matrix proc~initial_setup->proc~calculate_u_matrix proc~calculate_centrifugal_matrix calculate_centrifugal_matrix proc~initial_setup->proc~calculate_centrifugal_matrix proc~handle_final_propagation_steps->proc~general_propagation_step proc~print_pes_matrix_elements_summary->proc~write_message proc~print_pes_matrix_elements_summary->proc~integer_to_character proc~check_namelist_input->proc~write_message proc~check_namelist_input->proc~integer_to_character proc~check_namelist_input->proc~write_error proc~check_namelist_input->proc~to_lowercase proc~check_namelist_input->interface~incorrect_value proc~check_namelist_basis->proc~integer_to_character proc~check_namelist_basis->interface~incorrect_value proc~riccati_bessel_j->proc~integer_to_character proc~rctj rctj proc~riccati_bessel_j->proc~rctj proc~write_warning write_warning proc~riccati_bessel_j->proc~write_warning proc~modified_bessel_temme_algorithm modified_bessel_temme_algorithm proc~modified_bessel_k_ratio->proc~modified_bessel_temme_algorithm proc~print_all_cross_sections->proc~write_message proc~print_all_cross_sections->proc~total_energy proc~check_number_of_channels->proc~integer_to_character proc~check_number_of_channels->proc~write_error proc~read_and_validate_lambda->proc~integer_to_character proc~read_and_validate_lambda->proc~write_error proc~calculate_log_der_matrix->interface~invert_symmetric_matrix proc~calculate_log_der_matrix->dgemm proc~calculate_log_der_matrix->interface~fill_symmetric_matrix interface~add_scalar_to_diagonal add_scalar_to_diagonal proc~calculate_log_der_matrix->interface~add_scalar_to_diagonal proc~process_single_matrix_element process_single_matrix_element proc~prepare_pes_matrix_elements->proc~process_single_matrix_element proc~update_body_fixed_channels_info->proc~write_error proc~file_io_status->proc~integer_to_character proc~file_io_status->proc~write_error proc~propagator_summary->proc~write_message proc~propagator_summary->proc~float_to_character proc~propagator_summary->proc~integer_to_character proc~zero_projections_3j_condition zero_projections_3j_condition proc~check_nonzero_pes_matrix_elements->proc~zero_projections_3j_condition proc~wavevector_squared_from_energy->proc~write_error proc~wavevector_squared_from_energy->proc~total_energy proc~input_summary->proc~write_message proc~input_summary->proc~float_to_character proc~input_summary->proc~integer_to_character proc~input_summary->proc~total_energy proc~print_detailed_cross_section_info->proc~write_message proc~print_detailed_cross_section_info->proc~integer_to_character proc~general_propagation_step->interface~invert_symmetric_matrix proc~general_propagation_step->interface~fill_symmetric_matrix proc~general_propagation_step->proc~calculate_coupling_matrix proc~general_propagation_step->proc~calculate_t_matrix proc~general_propagation_step->proc~calculate_pes_matrix proc~general_propagation_step->proc~calculate_u_matrix proc~print_pes_quantum_numbers->proc~write_message proc~print_pes_quantum_numbers->proc~integer_to_character proc~find_reduced_term find_reduced_term proc~reduce_coupling_terms->proc~find_reduced_term proc~sum_cross_section_contributions sum_cross_section_contributions proc~compute_individual_cross_section->proc~sum_cross_section_contributions proc~get_block_indices get_block_indices proc~compute_individual_cross_section->proc~get_block_indices proc~check_namelist_potential->proc~integer_to_character proc~check_namelist_potential->interface~incorrect_value proc~write_error->proc~write_message proc~spline->proc~integer_to_character proc~spline->proc~write_error proc~update_channel_counts_body_fixed update_channel_counts_body_fixed proc~calculate_number_of_channels_body_fixed->proc~update_channel_counts_body_fixed proc~char_to_lowercase char_to_lowercase proc~to_lowercase->proc~char_to_lowercase proc~riccati_bessel_y->proc~integer_to_character proc~riccati_bessel_y->proc~write_warning proc~rcty rcty proc~riccati_bessel_y->proc~rcty proc~handle_unitarity_output_message->proc~write_message proc~print_sum_of_squares print_sum_of_squares proc~handle_unitarity_output_message->proc~print_sum_of_squares proc~handle_unitarity_output_message->proc~write_warning proc~incorrect_value_ch incorrect_value_ch interface~incorrect_value->proc~incorrect_value_ch proc~incorrect_value_dp incorrect_value_dp interface~incorrect_value->proc~incorrect_value_dp proc~incorrect_value_sp incorrect_value_sp interface~incorrect_value->proc~incorrect_value_sp proc~incorrect_value_int32 incorrect_value_int32 interface~incorrect_value->proc~incorrect_value_int32 proc~msta1 msta1 proc~rctj->proc~msta1 proc~msta2 msta2 proc~rctj->proc~msta2 proc~is_sum_even is_sum_even proc~zero_projections_3j_condition->proc~is_sum_even proc~triangle_inequality_holds triangle_inequality_holds proc~zero_projections_3j_condition->proc~triangle_inequality_holds proc~incorrect_value_ch->proc~write_error fwig3jj fwig3jj proc~p_coeff->fwig3jj proc~incorrect_value_dp->proc~write_error proc~print_sum_of_squares->proc~write_message proc~print_sum_of_squares->proc~float_to_character proc~print_sum_of_squares->proc~integer_to_character proc~write_warning->proc~write_message proc~compute_imag_component compute_imag_component proc~sum_cross_section_contributions->proc~compute_imag_component proc~compute_real_component compute_real_component proc~sum_cross_section_contributions->proc~compute_real_component proc~incorrect_value_sp->proc~write_error proc~process_single_matrix_element->proc~zero_projections_3j_condition proc~percival_seaton_coefficient percival_seaton_coefficient proc~process_single_matrix_element->proc~percival_seaton_coefficient proc~incorrect_value_int32->proc~write_error proc~calculate_pes_matrix->interface~fill_symmetric_matrix proc~calculate_single_pes_matrix_element calculate_single_pes_matrix_element proc~calculate_pes_matrix->proc~calculate_single_pes_matrix_element proc~modified_bessel_temme_algorithm->proc~write_error proc~rgamma rgamma proc~modified_bessel_temme_algorithm->proc~rgamma proc~calculate_u_matrix->interface~invert_symmetric_matrix proc~calculate_u_matrix->interface~fill_symmetric_matrix proc~calculate_u_matrix->interface~add_scalar_to_diagonal proc~calculate_centrifugal_matrix->interface~fill_symmetric_matrix proc~delta_for_zero_omega delta_for_zero_omega proc~calculate_centrifugal_matrix->proc~delta_for_zero_omega proc~calculate_diagonal_centrifugal_element calculate_diagonal_centrifugal_element proc~calculate_centrifugal_matrix->proc~calculate_diagonal_centrifugal_element proc~calculate_offdiagonal_centrifugal_element calculate_offdiagonal_centrifugal_element proc~calculate_centrifugal_matrix->proc~calculate_offdiagonal_centrifugal_element proc~envj envj proc~msta1->proc~envj proc~percival_seaton_coefficient->fwig3jj proc~calculate_single_pes_matrix_element->proc~wavevector_squared_from_energy proc~get_radial_coupling_term_value get_radial_coupling_term_value proc~calculate_single_pes_matrix_element->proc~get_radial_coupling_term_value proc~msta2->proc~envj

Contents

Source Code


Variables

Type Attributes Name Initial
real(kind=dp), allocatable :: BF_log_der_matrix(:,:)
real(kind=dp), allocatable :: SF_log_der_matrix(:,:)
real(kind=dp), allocatable :: accumulated_cross_sections(:)
real(kind=dp), allocatable :: basis_wavevectors(:)
real(kind=dp), allocatable :: block_wavevectors(:)
integer, allocatable :: channel_indices(:)
integer, allocatable :: channel_l_values(:)
integer, allocatable :: channels_omega_values(:)
integer(kind=int32) :: consecutive_blocks_thresholddiag = 0
integer(kind=int32) :: consecutive_blocks_thresholdoff = 0
integer(kind=int32) :: count_blocks = 0
integer(kind=int32) :: jtot_
real(kind=dp), allocatable :: k_matrix(:,:)
real(kind=dp) :: k_potential_depth
real(kind=dp) :: largest_wavevector
real(kind=dp) :: max_elastic_cross_section
integer(kind=int32) :: max_elastic_index
real(kind=dp) :: max_inelastic_cross_section
integer(kind=int32) :: max_inelastic_index_1
integer(kind=int32) :: max_inelastic_index_2
real(kind=dp), allocatable :: nonzero_algebraic_coefficients(:)
integer, allocatable :: nonzero_legendre_indices(:)
integer, allocatable :: nonzero_terms_per_element(:)
integer(kind=int32) :: number_of_channels
integer(kind=int32) :: number_of_open_basis_levels
integer(kind=int32) :: number_of_open_channels
integer(kind=int32) :: number_of_steps
integer, allocatable :: open_basis_levels(:)
integer(kind=int32) :: parity_exponent
real(kind=dp), allocatable :: partial_cross_sections_block(:)
real(kind=dp), allocatable :: partial_cross_sections_jtot(:)
real(kind=dp), allocatable :: s_matrix_imag(:,:)
real(kind=dp), allocatable :: s_matrix_real(:,:)
integer(kind=int32) :: size_even
integer(kind=int32) :: size_odd
integer, allocatable :: smatcheckarr(:)
logical :: terminate = .false.
real(kind=dp) :: time_init
real(kind=dp) :: time_init_stop
real(kind=dp) :: time_jtot
real(kind=dp) :: time_jtot_start
real(kind=dp) :: time_jtot_stop
real(kind=dp) :: time_parity
real(kind=dp) :: time_parity_start
real(kind=dp) :: time_parity_stop
real(kind=dp) :: time_total
real(kind=dp) :: time_total_start
real(kind=dp) :: time_total_stop
logical :: unitarity_block_check

Source Code

program SCATTERING
   !---------------------------------------------------------------------------!
   !!                      the SCATTERING code - version 0.0.1
   !!                    optimized for diatom-atom calculations
   !!                                 25-01-2024
   !!                                 H. Jozwiak
   !---------------------------------------------------------------------------!
   !! Please, refer to this version of the code by citing the following paper
   !! H. Jozwiak, F. Thibault, A. Viel, P. Wcislo, F. Lique,
   !! Rovibrational (de-)excitation of H2 by He revisited
   !! https://doi.org/10.48550/arXiv.2311.09890
   !---------------------------------------------------------------------------!
   use, intrinsic :: iso_fortran_env, only: int32, sp => real32, dp => real64
   use utility_functions_mod, only: write_header,                              &
      write_message, float_to_character, integer_to_character,                 &
      time_count_summary, no_open_channels_message
   use array_operations_mod, only: append, allocate_1d, allocate_2d
   use global_variables_mod
   use physics_utilities_mod, only: count_open_basis_levels,                   &
      save_open_basis_levels, units_conversion
   use input_reader_mod, only: read_input_file
   use radial_coupling_terms_mod, only: read_radial_coupling_terms,            &
      reduce_radial_coupling_terms, interpolate_radial_coupling_terms
   use channels_mod, only: set_number_of_channels, set_body_fixed_channels,    &
      set_space_fixed_channels, count_open_channels_in_block,                  &
      calculate_largest_wavevector, calculate_number_of_steps,                 &
      prepare_wavevector_array, print_short_block_summary, print_channels
   use pes_matrix_mod, only: initialize_pes_matrix
   use propagator_mod, only: numerov
   use boundary_conditions_mod, only: calculate_sf_matrix_from_bf_matrix,      &
      calculate_k_matrix, calculate_s_matrix
   use unitarity_check_mod, only: unitarity_check, print_final_unitarity_warning
   use state_to_state_cross_sections_mod, only:initialize_cross_section_arrays,&
      calculate_state_to_state_cross_section,  add_cross_sections,             &
      print_largest_partial_cross_sections, print_cross_sections_for_jtot,     &
      print_final_cross_sections,  determine_largest_cross_sections,           &
      check_cross_section_thresholds, save_partial_xs_file_header,             &
      save_partial_xs_single_block
   use save_s_matrix_mod, only: save_s_matrix_file_header, save_s_matrix_block_info
   !---------------------------------------------------------------------------!
   implicit none
   !---------------------------------------------------------------------------!
   integer(int32) :: number_of_channels, size_even, size_odd,                  &
      number_of_open_basis_levels, jtot_, parity_exponent, number_of_steps,    &
      number_of_open_channels, max_elastic_index, max_inelastic_index_1,       &
      max_inelastic_index_2
   !---------------------------------------------------------------------------!
   integer(int32) :: count_blocks = 0
   integer(int32) :: consecutive_blocks_thresholddiag = 0
   integer(int32) :: consecutive_blocks_thresholdoff = 0
   !---------------------------------------------------------------------------!
   real(dp) :: largest_wavevector, k_potential_depth,                          &
      max_elastic_cross_section, max_inelastic_cross_section, time_total_start,&
      time_total_stop, time_total, time_init_stop, time_init, time_jtot_start, &
      time_jtot_stop, time_jtot, time_parity_start,time_parity_stop,           &
      time_parity
   logical :: unitarity_block_check
   logical :: terminate = .false.
   integer, allocatable :: channel_indices(:), channels_omega_values(:),&
      channel_l_values(:), open_basis_levels(:), nonzero_terms_per_element(:), &
      nonzero_legendre_indices(:), smatcheckarr(:)
   real(dp), allocatable :: basis_wavevectors(:), block_wavevectors(:),        &
      nonzero_algebraic_coefficients(:), accumulated_cross_sections(:),        &
      partial_cross_sections_block(:), partial_cross_sections_jtot(:)
   real(dp), allocatable :: BF_log_der_matrix(:,:), SF_log_der_matrix(:,:),    &
      k_matrix(:,:), s_matrix_real(:,:), s_matrix_imag(:,:)
   !---------------------------------------------------------------------------!
   !---------------------------------------------------------------------------!
   ! Initizalization: start the time count
   !---------------------------------------------------------------------------!
   call cpu_time(time_total_start)
   !---------------------------------------------------------------------------!
   ! Initialize fwigxjpf library
   !---------------------------------------------------------------------------!
   call fwig_table_init(2*100, 9)
   call fwig_temp_init(2*100)
   !---------------------------------------------------------------------------!
   ! Print the header
   !---------------------------------------------------------------------------!
   call write_header("main")
   !---------------------------------------------------------------------------!
   ! Read the input file
   !---------------------------------------------------------------------------!
   call read_input_file
   !---------------------------------------------------------------------------!
   ! S-matrix file: write input parameters and basis levels
   !---------------------------------------------------------------------------!
   call save_s_matrix_file_header
   !---------------------------------------------------------------------------!
   ! Prepare the file with the partial XS
   !---------------------------------------------------------------------------!
   if (print_partial_cross_sections) then
      call save_partial_xs_file_header
   endif
   !---------------------------------------------------------------------------!
   ! Convert units: starting now, everything is in atomic units
   !---------------------------------------------------------------------------!
   call units_conversion
   !---------------------------------------------------------------------------!
   ! Read the radial terms of the potential from external file
   !---------------------------------------------------------------------------!
   call read_radial_coupling_terms
   !---------------------------------------------------------------------------!
   ! Reduce matrix elements that are not needed
   !---------------------------------------------------------------------------!
   call reduce_radial_coupling_terms
   !---------------------------------------------------------------------------!
   ! Interpolate radial terms                                            
   !---------------------------------------------------------------------------!
   call interpolate_radial_coupling_terms
   !---------------------------------------------------------------------------!
   ! Search for energetically accessible levels and prepare the arrays that are
   ! needed in the calculations of the state-to-state XS                       
   !---------------------------------------------------------------------------!
   number_of_open_basis_levels = count_open_basis_levels()
   call save_open_basis_levels(number_of_open_basis_levels, open_basis_levels, &
      basis_wavevectors)
   !---------------------------------------------------------------------------!
   ! Initialize arrays that save the state-to-state cross-sections
   !---------------------------------------------------------------------------!
   call initialize_cross_section_arrays(number_of_open_basis_levels,           &
      partial_cross_sections_block, partial_cross_sections_jtot,               &
      accumulated_cross_sections)
   !---------------------------------------------------------------------------!
   ! Initialization is finished                                                
   !---------------------------------------------------------------------------!
   call cpu_time(time_init_stop)
   if (print_level.ge.2) call time_count_summary(time_total_start,             &
      time_init_stop, time_init, "Initialization completed in ")
   !---------------------------------------------------------------------------!
   ! Loop over total angular momentum
   !---------------------------------------------------------------------------!
   call write_header("jtot_loop")
   !---------------------------------------------------------------------------!
   do jtot_ = jtot_min,jtot_max,jtot_step
      !------------------------------------------------------------------------!
      call write_header("block", opt_integer_ = jtot_)
      !------------------------------------------------------------------------!
      call cpu_time(time_jtot_start)
      !------------------------------------------------------------------------!
      partial_cross_sections_jtot = 0
      call set_number_of_channels(jtot_, size_even, size_odd)
      !------------------------------------------------------------------------!
      do parity_exponent = 0,1
         !---------------------------------------------------------------------!
         call cpu_time(time_parity_start)
         !---------------------------------------------------------------------!
         select case(parity_exponent)
            case(0)
               number_of_channels = size_even
            case(1)
               number_of_channels = size_odd
         end select
         !---------------------------------------------------------------------!
         if (number_of_channels == 0) cycle
         !---------------------------------------------------------------------!
         ! Summary of the current block
         !---------------------------------------------------------------------!
         count_blocks = count_blocks+1
         if (print_level.ge.1) then
            call print_short_block_summary(jtot_, parity_exponent,             &
               count_blocks, number_of_channels)
         endif
         !---------------------------------------------------------------------!
         ! Prepare of the basis for each J/p block:
         ! channels_omega_values holds all values of omega (BF_)
         ! channel_l_values holds all values of l (SF_)
         ! channel_indices holds the indices which refer to the basis arrays:
         !   --   v1level/j1level/internal_energies
         !---------------------------------------------------------------------!
         call allocate_1d(channels_omega_values,number_of_channels)
         call allocate_1d(channel_l_values,number_of_channels)
         call allocate_1d(channel_indices,number_of_channels)
         !---------------------------------------------------------------------!
         ! Prepare channels_omega_values, channel_indices and channel_l_values
         !---------------------------------------------------------------------!
         call set_body_fixed_channels(jtot_, parity_exponent, channel_indices, &
            channels_omega_values)
         call set_space_fixed_channels(jtot_, parity_exponent, channel_l_values)
         !---------------------------------------------------------------------!
         ! Print the BF quantum numbers on screen
         !---------------------------------------------------------------------!
         if (print_level.ge.1) call print_channels(parity_exponent,            &
            channel_indices, channels_omega_values)
         !---------------------------------------------------------------------!
         ! Determine the number of open (energetically accessible) channels
         !---------------------------------------------------------------------!
         number_of_open_channels = count_open_channels_in_block(channel_indices)
         !---------------------------------------------------------------------!
         ! If there are no open channels, skip this block
         !---------------------------------------------------------------------!
         if (number_of_open_channels == 0) then
            call no_open_channels_message(count_blocks)
            cycle
         endif
         !---------------------------------------------------------------------!
         ! Array of wavevectors in given block (to save in the S-matrix file)
         !---------------------------------------------------------------------!
         call allocate_1d(block_wavevectors, number_of_open_channels)
         call prepare_wavevector_array(channel_indices, block_wavevectors)
         !---------------------------------------------------------------------!
         ! Determine the largest wavevector in the block
         !---------------------------------------------------------------------!
         largest_wavevector = calculate_largest_wavevector(channel_indices)
         !---------------------------------------------------------------------!
         ! Determine the number of steps on the intermolecular (R) grid
         !---------------------------------------------------------------------!
         k_potential_depth = dsqrt(2*reduced_mass*potential_depth)
         number_of_steps = calculate_number_of_steps(largest_wavevector,       &
            k_potential_depth)
         !---------------------------------------------------------------------!
         ! Prepare the PES matrix
         !---------------------------------------------------------------------!
         call initialize_pes_matrix(channel_indices, channels_omega_values,    &
            nonzero_terms_per_element, nonzero_legendre_indices,               &
            nonzero_algebraic_coefficients)
         !---------------------------------------------------------------------!
         ! Allocate asymptotic body-fixed (BF) log-derivative matrix
         ! and call the propagator
         !---------------------------------------------------------------------!
         call allocate_2d(BF_log_der_matrix, number_of_channels,               &
            number_of_channels)
         call numerov(number_of_channels, channel_indices,                     &
            channels_omega_values, nonzero_terms_per_element,                  &
            nonzero_legendre_indices, nonzero_algebraic_coefficients,          &
            number_of_steps, jtot_, BF_log_der_matrix)
         !---------------------------------------------------------------------!
         ! Allocate asymptotic space-fixed (SF) log-derivative matrix and
         ! transform the BF result to the SF frame
         !---------------------------------------------------------------------!
         call allocate_2d(SF_log_der_matrix, number_of_channels, number_of_channels)
         call calculate_sf_matrix_from_bf_matrix(number_of_channels, jtot_,    &
            channel_indices, channels_omega_values, channel_l_values,          &
            BF_log_der_matrix, SF_log_der_matrix)
         !---------------------------------------------------------------------!
         ! Get the K-matrix from log-derivative matrix
         ! (Eq. 4 in "Solution of the coupled equations")
         !---------------------------------------------------------------------!
         call allocate_2d(k_matrix, number_of_open_channels, number_of_open_channels)
         call calculate_k_matrix(number_of_channels, SF_log_der_matrix,        &
            number_of_open_channels, channel_indices, channel_l_values,        &
            r_max, k_matrix)
         !---------------------------------------------------------------------!
         ! Get the S-matrix from the K-matrix
         ! (Eq. 12 in "Solution of the coupled equations")
         !---------------------------------------------------------------------!
         call allocate_2d(s_matrix_real,number_of_open_channels,number_of_open_channels)
         call allocate_2d(s_matrix_imag,number_of_open_channels,number_of_open_channels)
         call calculate_s_matrix(number_of_open_channels,k_matrix,s_matrix_real,s_matrix_imag)
         !---------------------------------------------------------------------!
         ! S-matrix is written to the binary S-matrix file
         !---------------------------------------------------------------------!
         call save_s_matrix_block_info(jtot_, parity_exponent,                 &
            number_of_open_channels, channel_indices, channel_l_values,        &
            block_wavevectors, s_matrix_real, s_matrix_imag)
         !---------------------------------------------------------------------!
         ! Check if the S-matrices are unitary
         !---------------------------------------------------------------------!
         call unitarity_check(number_of_open_channels, s_matrix_real,          &
            s_matrix_imag, unitarity_block_check)
         !---------------------------------------------------------------------!
         ! If the unitary is not fulfilled, keep the information about this block
         !---------------------------------------------------------------------!
         if (.not.(unitarity_block_check)) then
            call append(smatcheckarr, jtot_)
         endif
         !---------------------------------------------------------------------!
         ! Calculate all available cross-sections
         !---------------------------------------------------------------------!
         call calculate_state_to_state_cross_section(jtot_, open_basis_levels, &
            basis_wavevectors,s_matrix_real,s_matrix_imag,channel_indices,     &
            channel_l_values,partial_cross_sections_block)
         !---------------------------------------------------------------------!
         ! Print the results from this parity block to the partial XS file
         ! and add the calculated partial XS to the partial_cross_sections_jtot array
         !---------------------------------------------------------------------!
         if (print_partial_cross_sections) then
            call save_partial_xs_single_block(jtot_, count_blocks,             &
               open_basis_levels, partial_cross_sections_block)
         endif
         call add_cross_sections(number_of_open_basis_levels,                  &
            partial_cross_sections_block, partial_cross_sections_jtot)
         !---------------------------------------------------------------------!
         ! Check the time after each parity block:
         !---------------------------------------------------------------------!
         call cpu_time(time_parity_stop)
         if (print_level.ge.2) call time_count_summary(time_parity_start,      &
            time_parity_stop, time_parity, "Parity block completed in ")
         !---------------------------------------------------------------------!
         ! ... end of the loop over parity                                      
         !---------------------------------------------------------------------!
         call write_message(repeat("-", 90))
      enddo
      !------------------------------------------------------------------------!
      ! Add the cross-sections from this Jtot block:
      !------------------------------------------------------------------------!
      call add_cross_sections(number_of_open_basis_levels,                     &
            partial_cross_sections_jtot, accumulated_cross_sections)
      !------------------------------------------------------------------------!
      ! Determine the largest partial elastic/inelastic XS in this Jtot block:
      !------------------------------------------------------------------------!
      call determine_largest_cross_sections(open_basis_levels,                 &
         partial_cross_sections_jtot, max_elastic_cross_section,               &
         max_inelastic_cross_section, max_elastic_index,                       &
         max_inelastic_index_1, max_inelastic_index_2)
      !------------------------------------------------------------------------!
      call print_largest_partial_cross_sections(jtot_,                         &
         max_elastic_cross_section, max_inelastic_cross_section,               &
         max_elastic_index, max_inelastic_index_1, max_inelastic_index_2,      &
         open_basis_levels)
      !------------------------------------------------------------------------!
      if (jtot_max == 999999) then
         call check_cross_section_thresholds(max_elastic_cross_section,        &
            max_inelastic_cross_section, consecutive_blocks_thresholddiag,     &
            consecutive_blocks_thresholdoff, terminate)
      endif
      !------------------------------------------------------------------------!
      ! Check the time after each JTOT block:                                  
      !------------------------------------------------------------------------!
      call cpu_time(time_jtot_stop)
      !------------------------------------------------------------------------!
      ! Print all the XS after current JTOT block                              
      !------------------------------------------------------------------------!
      if (print_level.ge.3) then
         call print_cross_sections_for_jtot(jtot_, open_basis_levels,          &
            accumulated_cross_sections)
      endif
      !------------------------------------------------------------------------!
      if (print_level.ge.2) call time_count_summary(time_jtot_start,           &
         time_jtot_stop, time_jtot, "Total angular momentum block completed in ")
      !------------------------------------------------------------------------!
      ! terminate the loop if elastic_xs_threshold/inelastic_xs_threshold
      ! condition is satisfied
      !------------------------------------------------------------------------!
      if (terminate) exit
   enddo
   !---------------------------------------------------------------------------!
   call write_header("loop_terminated")
   call write_header("summary")
   !---------------------------------------------------------------------------!
   ! if for some JTOTs the S-matrix did not fulfill the unitary check,
   ! these are listed here
   !---------------------------------------------------------------------------!
   if (allocated(smatcheckarr)) then
      call print_final_unitarity_warning(smatcheckarr)
   endif
   !---------------------------------------------------------------------------!
   ! Print all the calculated XS                                                
   !---------------------------------------------------------------------------!
   call print_final_cross_sections(open_basis_levels, accumulated_cross_sections)
   !---------------------------------------------------------------------------!
   call fwig_temp_free();
   call fwig_table_free();
   !---------------------------------------------------------------------------!
   ! Stop the time count
   !---------------------------------------------------------------------------!
   call cpu_time(time_total_stop)
   call time_count_summary(time_total_start, time_total_stop, time_total,      &
      "Total CPU time: ")
   !---------------------------------------------------------------------------!
   close(s_matrix_unit)
   !---------------------------------------------------------------------------!
   if (print_partial_cross_sections) then
      close(partial_file_unit)
   endif
   !---------------------------------------------------------------------------!
end program SCATTERING