#include <AMA.h>
Functions | |
long int | AMA_MltvGrdInterp (AMA_OPTIONS *options, long int nind, long int *ng, double **x, double *z, long int *degree, AMA_SPLINE **spline) |
Interpolation of Multivariate Gridded Data More... | |
long int AMA_MltvGrdInterp | ( | AMA_OPTIONS * | options, |
long int | nind, | ||
long int * | ng, | ||
double ** | x, | ||
double * | z, | ||
long int * | degree, | ||
AMA_SPLINE ** | spline | ||
) |
Interpolation of Multivariate Gridded Data
This function employs cnspla to compute a spline interpolant of independent variable data and dependent variable data . The independent variable data is given as , for and , and it defines the rectilinear grid
The dependent variable data lies on the grid and is given as , for ; that is, there are dependent variable values.
For a given set of data this function employs cnspla to compute the spline
that minimizes
subject to the interpolation constraints
for . This function also imposes constraints on the spline's partial derivative at its left hand boundary and its right hand boundary , for all . These constraints are
for
These constraints are imposed at , for all where and .
In the above definition of the , for and , are the coefficients of the tensor product B-splines
where are the univariate B-splines of degree defined by the knot vector . The knot vectors are
and they depend on the independent variable data and the degree . The knot vector is defined by AMA_LamdaInterp() based on the points .
This function employs an efficient algorithm for computing spline interpolants of multivariate gridded data. The algorithm consists of computing the splines
for . The coefficients of are the coefficients of the tensor product B-splines
where are the univariate B-splines of degree defined by the knot vector . The degree is
the number of coefficients is
and the knot vector is
The spline is based on the spline and is defined by setting its coefficents for and . The spline is defined through multiple invocations of AMA_UnvInterp() in the following manner.
First, the spline is defined by invoking AMA_UnvInterp() times to compute the univariate spline
that minimizes
subject to the interpolation constraints
for , and the boundary constraints
for
Computing the univariate splines , for and , defines the coefficients of .
After computing the splines , for , are defined by invoking AMA_UnvInterp() times to compute the univariate spline
that minimizes
subject to the interpolation constraints
for , and the boundary constraints
for
Computing the univariate splines , for when and for when , defines the coefficients of .
In total this algorithm consists of invocations of AMA_UnvInterp() to compute a multivariate spline which satisfies the interpolation and boundary constraints.
This function does the following:
Parameter Note: In the parameters description given below the limits on are , k = and N .
options | [in] Pointer to AMA_OPTIONS. Must be initialized with AMA_Options() prior to calling AMA_MltvGrdInterp(). |
nind | [in] The number of independent variables . Must satisfy nind AMA_MXNIND. |
ng | [in] Array of size nind containing the number of points where ng[k] . Must satisfy ng[k] . |
x | [in] Array of size nind containing arrays of size ng[k] where x[k] contains the independent variable data , for . The values of x[k] must be in strictly ascending order. |
z | [in] Array of size N containing the dependent variable data , for . |
degree | [in] Array of size nind containing the degree where degree[k] . Must satisfy degree[k] . |
spline | [out] Pointer to AMA_SPLINE pointer containing the spline interpolant. Must satisfy spline NULL. |
User Callable Function - Documented 030215