interpolate_radial_coupling_terms Subroutine

public subroutine interpolate_radial_coupling_terms()

Interpolates the radial coupling terms using cubic spline functions. The resulting spline coefficients for each coupling term are stored in coupling_terms_b_coeffs, coupling_terms_c_coeffs, and coupling_terms_d_coeffs matrices.

Arguments

None

Calls

proc~~interpolate_radial_coupling_terms~~CallsGraph proc~interpolate_radial_coupling_terms interpolate_radial_coupling_terms proc~spline spline proc~interpolate_radial_coupling_terms->proc~spline proc~integer_to_character integer_to_character proc~spline->proc~integer_to_character proc~write_error write_error proc~spline->proc~write_error proc~write_message write_message proc~write_error->proc~write_message

Called by

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

Contents


Variables

Type Visibility Attributes Name Initial
integer(kind=int32), private :: coupling_index_
integer(kind=int32), private :: lambda_index_
real(kind=dp), private :: spline_coeff_b(number_of_r_points)
real(kind=dp), private :: spline_coeff_c(number_of_r_points)
real(kind=dp), private :: spline_coeff_d(number_of_r_points)

Source Code

      subroutine interpolate_radial_coupling_terms
         !! Interpolates the radial coupling terms using cubic spline functions.
         !! The resulting spline coefficients for each coupling term
         !! are stored in coupling_terms_b_coeffs, coupling_terms_c_coeffs,
         !! and coupling_terms_d_coeffs matrices.
         !---------------------------------------------------------------------!
         integer(int32) :: lambda_index_, coupling_index_
         real(dp) :: spline_coeff_b(number_of_r_points),                       &
            spline_coeff_c(number_of_r_points), spline_coeff_d(number_of_r_points)
         !---------------------------------------------------------------------!
         do lambda_index_ = 1, number_of_legendre_indices
            do coupling_index_ = 1, minimal_number_of_coupling_terms
               !---------------------------------------------------------------!
               ! Compute spline coefficients for each coupling term
               !---------------------------------------------------------------!
               call SPLINE(number_of_r_points,r_grid,coupling_terms(           &
                  :,lambda_index_,coupling_index_), spline_coeff_b,            &
                  spline_coeff_c, spline_coeff_d)
               !---------------------------------------------------------------!
               ! Store coefficients in the respective matrices
               !---------------------------------------------------------------!
               coupling_terms_b_coeffs(:,lambda_index_,coupling_index_)        &
                  = spline_coeff_b
               coupling_terms_c_coeffs(:,lambda_index_,coupling_index_)        &
                  = spline_coeff_c
               coupling_terms_d_coeffs(:,lambda_index_,coupling_index_)        &
                  = spline_coeff_d
            enddo
         enddo
         !---------------------------------------------------------------------!
      end subroutine interpolate_radial_coupling_terms