Initialize the 1D Vandermonde matrix, for the Legendre-Gauss-Lobatto quadrature points.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=ip), | intent(in) | :: | n | The order of the Jacobi polynomials. |
||
real(kind=wp), | intent(in), | dimension(:) | :: | x | The points at which to evaluate the Vandermonde matrix. |
The return value is the Vandermonde matrix,
function Vandermonde1D ( n, x )
!! Initialize the 1D Vandermonde matrix, \(\mathcal{V}_{ij}=P_j(x_i)\)
!! for the Legendre-Gauss-Lobatto quadrature points.
integer(ip), intent(in) :: n
!! The order of the Jacobi polynomials.
real(wp), dimension(:), intent(in) :: x
!! The points \(x\in[-1:1]\) at which to evaluate the Vandermonde matrix.
real(wp), dimension(size(x),n+1) :: Vandermonde1D
!! The return value is the Vandermonde matrix, \(\mathcal{V}_{ij}\)
integer :: j
do j=1,n+1
Vandermonde1D(:,j) = JacobiP(x, 0.0_wp, 0.0_wp, j-1)
end do
return
end function VanderMonde1D