Block-Structured AMR Software Framework
amrex_lo_util_module Module Reference

Functions/Subroutines

subroutine polyinterpcoeff (xInt, x, N, c)
 polyInterpCoeff: More...
 

Function/Subroutine Documentation

◆ polyinterpcoeff()

subroutine amrex_lo_util_module::polyinterpcoeff ( real(amrex_real xInt,
real(amrex_real), dimension(n)  x,
integer  N,
real(amrex_real), dimension(n)  c 
)

polyInterpCoeff:

This routine returns the Lagrange interpolating coefficients for a polynomial through N points, evaluated at xInt (see Numerical Recipes, v2, p102, e.g.): `` (x-x2)(x-x3)...(x-xN) (x-x1)(x-x2)...(x-x(N-1)) P(x) = --------------------— y1 + ... + ---------------------— yN (x1-x2)(x1-x3)...(x1-xN) (x1-x2)(x1-x3)...(x1-xN)

P(xInt) = sum_(i=1)^(N) y[i]*c[i]``