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"
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=200), | private | :: | err_message | ||||
integer(kind=int32), | private | :: | io_status | ||||
integer(kind=int32), | private | :: | lambda_index_ |
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