read_radial_coupling_terms Subroutine

public subroutine read_radial_coupling_terms()

Reads the radial coupling terms from the external file. The file is assumed to be formatted as described in "Supplying radial terms" section. The read radial coupling terms are kept in "tabulated_coupling_terms"

Arguments

None

Calls

proc~~read_radial_coupling_terms~~CallsGraph proc~read_radial_coupling_terms read_radial_coupling_terms proc~file_io_status file_io_status proc~read_radial_coupling_terms->proc~file_io_status proc~validate_r_range validate_r_range proc~read_radial_coupling_terms->proc~validate_r_range proc~skip_header_lines skip_header_lines proc~read_radial_coupling_terms->proc~skip_header_lines proc~read_potential_data read_potential_data proc~read_radial_coupling_terms->proc~read_potential_data proc~read_and_validate_lambda read_and_validate_lambda proc~read_radial_coupling_terms->proc~read_and_validate_lambda proc~integer_to_character integer_to_character proc~file_io_status->proc~integer_to_character proc~write_error write_error proc~file_io_status->proc~write_error proc~float_to_character float_to_character proc~validate_r_range->proc~float_to_character proc~validate_r_range->proc~write_error proc~read_and_validate_lambda->proc~integer_to_character proc~read_and_validate_lambda->proc~write_error proc~write_message write_message proc~write_error->proc~write_message

Called by

proc~~read_radial_coupling_terms~~CalledByGraph proc~read_radial_coupling_terms read_radial_coupling_terms program~scattering SCATTERING program~scattering->proc~read_radial_coupling_terms

Contents


Variables

Type Visibility Attributes Name Initial
character(len=200), private :: err_message
integer(kind=int32), private :: io_status
integer(kind=int32), private :: lambda_index_

Source Code

      subroutine read_radial_coupling_terms
         !! Reads the radial coupling terms from the external file.
         !! The file is assumed to be formatted as described in
         !! "Supplying radial terms" section.
         !! The read radial coupling terms are kept in
         !! "tabulated_coupling_terms"
         !---------------------------------------------------------------------!
         character(len = 200) :: err_message
         integer(int32) :: lambda_index_, io_status
         !---------------------------------------------------------------------!
         open (coupling_terms_file_unit, file=trim(coupling_terms_file_name),  &
            form='formatted', status='old', iostat = io_status,                &
            iomsg = err_message)
         call file_io_status(io_status, err_message, coupling_terms_file_unit, &
            'o')
         !---------------------------------------------------------------------!
         ! Skip the informative lines at the beginning                         
         !---------------------------------------------------------------------!
         call skip_header_lines
         !---------------------------------------------------------------------!
         do lambda_index_ = 1, number_of_legendre_indices
            call read_and_validate_lambda(lambda_index_)
            call read_potential_data(lambda_index_)
         enddo
         !---------------------------------------------------------------------!
         close(coupling_terms_file_unit, iostat = io_status,                   &
            iomsg = err_message)
         call file_io_status(io_status, err_message, coupling_terms_file_unit, &
            'c')
         !---------------------------------------------------------------------!
         ! Check if supplied radial terms cover a sufficient range of R
         !---------------------------------------------------------------------!
         call validate_r_range
         !---------------------------------------------------------------------!
      end subroutine read_radial_coupling_terms