# naginterfaces.library.ode.bvp_​ps_​lin_​grid_​vals¶

naginterfaces.library.ode.bvp_ps_lin_grid_vals(nip, x, f)[source]

bvp_ps_lin_grid_vals interpolates from a set of function values on a supplied grid onto a set of values for a uniform grid on the same range. The interpolation is performed using barycentric Lagrange interpolation. bvp_ps_lin_grid_vals is primarily a utility function to map a set of function values specified on a Chebyshev Gauss–Lobatto grid onto a uniform grid.

For full information please refer to the NAG Library document for d02uw

https://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/d02/d02uwf.html

Parameters
nipint

The number, , of grid points in the uniform mesh onto which function values are interpolated. If then on successful exit from bvp_ps_lin_grid_vals, will contain the value .

xfloat, array-like, shape

The grid points, , for , at which the function is specified.

Usually this should be the array of Chebyshev Gauss–Lobatto points returned in bvp_ps_lin_cgl_grid().

ffloat, array-like, shape

The function values, , for .

Returns
xipfloat, ndarray, shape

The evenly-spaced grid points, , for .

fipfloat, ndarray, shape

The set of interpolated values , for . Here .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: is even.

(errno )

On entry, .

Constraint: .

Notes

bvp_ps_lin_grid_vals interpolates from a set of function values, , on a supplied grid, , for , onto a set of values, , on a uniform grid, , for . The image has the same range as , so that , for . The interpolation is performed using barycentric Lagrange interpolation as described in Berrut and Trefethen (2004).

bvp_ps_lin_grid_vals is primarily a utility function to map a set of function values specified on a Chebyshev Gauss–Lobatto grid computed by bvp_ps_lin_cgl_grid() onto an evenly-spaced grid with the same range as the original grid.

References

Berrut, J P and Trefethen, L N, 2004, Barycentric lagrange interpolation, SIAM Rev. (46(3)), 501–517