Skip to main content

LagrangeCoeff

Returns the coefficients of lagrange polynomial.

The Nth order lagrange polynomial in 1D can be described as:

li=n=0Nanxnl_{i} = \sum_{n=0}^{N} a_{n} x^{n}

This function returns coefficients ana_{n}

Interface 1

INTERFACE
MODULE FUNCTION LagrangeCoeff(order, elemType, i, xij) RESULT(ans)
INTEGER(I4B), INTENT(IN) :: order
!! order of polynomial
INTEGER(I4B), INTENT(IN) :: elemType
!! element type
INTEGER(I4B), INTENT(IN) :: i
!! ith coefficients for lagrange polynomial
REAL(DFP), INTENT(IN) :: xij(:, :)
!! points in xij format
REAL(DFP), ALLOCATABLE :: ans(:)
!! coefficients
END FUNCTION LagrangeCoeff
END INTERFACE