nag_ode_bvp_ps_lin_grid_vals (d02uwc) 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. nag_ode_bvp_ps_lin_grid_vals (d02uwc) is primarily a utility function to map a set of function values specified on a Chebyshev Gauss–Lobatto grid onto a uniform grid.
nag_ode_bvp_ps_lin_grid_vals (d02uwc) 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).
nag_ode_bvp_ps_lin_grid_vals (d02uwc) is primarily a utility function to map a set of function values specified on a Chebyshev Gauss–Lobatto grid computed by
nag_ode_bvp_ps_lin_cgl_grid (d02ucc) onto an evenly-spaced grid with the same range as the original grid.
- 1:
n – IntegerInput
On entry: , where the number of grid points for the input data is .
Constraint:
and
n is even.
- 2:
nip – IntegerInput
On entry: the number, , of grid points in the uniform mesh onto which function values are interpolated. If then on successful exit from nag_ode_bvp_ps_lin_grid_vals (d02uwc), will contain the value .
Constraint:
.
- 3:
x[] – const doubleInput
On entry: the grid points,
, for
, at which the function is specified.
Usually this should be the array of Chebyshev Gauss–Lobatto points returned in
nag_ode_bvp_ps_lin_cgl_grid (d02ucc).
- 4:
f[] – const doubleInput
On entry: the function values,
, for .
- 5:
xip[nip] – doubleOutput
On exit: the evenly-spaced grid points,
, for .
- 6:
fip[nip] – doubleOutput
On exit: the set of interpolated values
, for . Here .
- 7:
fail – NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
nag_ode_bvp_ps_lin_grid_vals (d02uwc) is intended, primarily, for use with Chebyshev Gauss–Lobatto input grids. For such input grids and for well-behaved functions (no discontinuities, peaks or cusps), the accuracy should be a small multiple of machine precision.
Not applicable.
None.