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.
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) |
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