nag_pde_interp_1d_fd (d03pzc) is an interpolation function for evaluating the solution of a system of partial differential equations (PDEs), at a set of user-specified points. The solution of the system of equations (possibly with coupled ordinary differential equations) must be computed using a finite difference scheme or a Keller box scheme on a set of mesh points. nag_pde_interp_1d_fd (d03pzc)
can then be employed to compute the solution at a set of points anywhere in the range of the mesh. It can also evaluate the first spatial derivative of the solution. It uses linear interpolation for approximating the solution.
4 References
None.
5 Arguments
Note: the arguments x, m, u, npts and npde must be supplied unchanged from the PDE function.
1:
npde – IntegerInput
On entry: the number of PDEs.
Constraint:
.
2:
m – IntegerInput
On entry: the coordinate system used. If the call to nag_pde_interp_1d_fd (d03pzc) follows one of the finite difference functions then m must be the same argument m as used in that call. For the Keller box scheme only Cartesian coordinate systems are valid and so mmust be set to zero. No check will be made by nag_pde_interp_1d_fd (d03pzc) in this case.
Indicates Cartesian coordinates.
Indicates cylindrical polar coordinates.
Indicates spherical polar coordinates.
Constraints:
following a finite difference function;
following a Keller box scheme function.
3:
u[] – const doubleInput
On entry: the PDE part of the original solution returned in the argument u by the PDE function.
On entry: , for , must contain the spatial interpolation points.
Constraint:
.
7:
intpts – IntegerInput
On entry: the number of interpolation points.
Constraint:
.
8:
itype – IntegerInput
On entry: specifies the interpolation to be performed.
The solutions at the interpolation points are computed.
Both the solutions and their first derivatives at the interpolation points are computed.
Constraint:
or .
9:
up[] – doubleOutput
Note: the dimension, dim, of the array
up
must be at least
.
The element is stored in the array element .
On exit: if , , contains the value of the solution , at the interpolation points , for and .
If , contains and contains at these points.
10:
fail – NagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).
6 Error Indicators and Warnings
NE_BAD_PARAM
On entry, argument had an illegal value.
NE_EXTRAPOLATION
On entry, interpolating point with the value is outside the x range.
NE_INT
On entry, :
.
On entry, .
Constraint: or .
On entry, .
Constraint: , or .
On entry, .
Constraint: .
On entry, .
Constraint: .
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
NE_NOT_STRICTLY_INCREASING
On entry, interpolation points xp badly ordered: , , and .