lag_intrp_mat Subroutine

public subroutine lag_intrp_mat(n, m, x, w, z, mat)

Computes the Lagrange interpolation (barycentric) matrix.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

Number of nodes = n+1

integer, intent(in) :: m

Number of interpolation points = m+1

real(kind=rp), intent(in), dimension(:) :: x

(n+1,). Nodal coordinates in strictly ascending order

real(kind=rp), intent(in), dimension(:) :: w

(n+1,). Barycentric weights

real(kind=rp), intent(in), dimension(:) :: z

(m+1,). Coordinates at which the function is to be interpolated

real(kind=rp), intent(out), dimension(:,:) :: mat

(m+1,n+1). Interpolation matrix