NAG CL Interface
e01tlc (dim4_scat_shep_eval)
1
Purpose
e01tlc evaluates the four-dimensional interpolating function generated by
e01tkc and its first partial derivatives.
2
Specification
void |
e01tlc (Integer m,
const double x[],
const double f[],
const Integer iq[],
const double rq[],
Integer n,
const double xe[],
double q[],
double qx[],
NagError *fail) |
|
The function may be called by the names: e01tlc, nag_interp_dim4_scat_shep_eval or nag_4d_shep_eval.
3
Description
e01tlc takes as input the interpolant
,
of a set of scattered data points
, for
, as computed by
e01tkc, and evaluates the interpolant and its first partial derivatives at the set of points
, for
.
e01tlc must only be called after a call to
e01tkc.
e01tlc is derived from the new implementation of QS3GRD described by
Renka (1988). It uses the modification for high-dimensional interpolation described by
Berry and Minser (1999).
4
References
Berry M W, Minser K S (1999) Algorithm 798: high-dimensional interpolation using the modified Shepard method ACM Trans. Math. Software 25 353–366
Renka R J (1988) Algorithm 661: QSHEP3D: Quadratic Shepard method for trivariate interpolation of scattered data ACM Trans. Math. Software 14 151–152
5
Arguments
-
1:
– Integer
Input
-
On entry:
must be the same value supplied for argument
m in the preceding call to
e01tkc.
Constraint:
.
-
2:
– const double
Input
-
Note: the coordinates of are stored in .
On entry:
must be the same array supplied as argument
x in the preceding call to
e01tkc. It
must remain unchanged between calls.
-
3:
– const double
Input
-
On entry:
must be the same array supplied as argument
f in the preceding call to
e01tkc. It
must remain unchanged between calls.
-
4:
– const Integer
Input
-
On entry:
must be the same array returned as argument
iq in the preceding call to
e01tkc. It
must remain unchanged between calls.
-
5:
– const double
Input
-
On entry:
must be the same array returned as argument
rq in the preceding call to
e01tkc. It
must remain unchanged between calls.
-
6:
– Integer
Input
-
On entry: , the number of evaluation points.
Constraint:
.
-
7:
– const double
Input
-
Note: the th element of the matrix is stored in .
On entry: must be set to the evaluation point , for .
-
8:
– double
Output
-
On exit:
contains the value of the interpolant, at
, for
. If any of these evaluation points lie outside the region of definition of the interpolant the corresponding entries in
q are set to the largest machine representable number (see
X02ALC), and
e01tlc returns with
NE_BAD_POINT.
-
9:
– double
Output
-
Note: the th element of the matrix is stored in .
On exit:
contains the value of the partial derivatives with respect to
of the interpolant
at
, for
, and for each of the four partial derivatives
. If any of these evaluation points lie outside the region of definition of the interpolant, the corresponding entries in
qx are set to the largest machine representable number (see
X02ALC), and
e01tlc returns with
NE_BAD_POINT.
-
10:
– NagError *
Input/Output
-
The NAG error argument (see
Section 7 in the Introduction to the NAG Library CL Interface).
6
Error Indicators and Warnings
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
See
Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
- NE_BAD_PARAM
-
On entry, argument had an illegal value.
- NE_BAD_POINT
-
On entry, at least one evaluation point lies outside the region of definition of the interpolant. At such points the corresponding values in
q and
qx contain extrapolated approximations. Points should be evaluated one by one to identify extrapolated values.
- NE_INT
-
On entry, .
Constraint: .
On entry, .
Constraint: .
- NE_INT_ARRAY
-
On entry, values in
iq appear to be invalid. Check that
iq has not been corrupted between calls to
e01tkc and
e01tlc.
- 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.
See
Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
- NE_NO_LICENCE
-
Your licence key may have expired or may not have been installed correctly.
See
Section 8 in the Introduction to the NAG Library CL Interface for further information.
- NE_REAL_ARRAY
-
On entry, values in
rq appear to be invalid. Check that
rq has not been corrupted between calls to
e01tkc and
e01tlc.
7
Accuracy
Computational errors should be negligible in most practical situations.
8
Parallelism and Performance
e01tlc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
e01tlc makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
The time taken for a call to e01tlc will depend in general on the distribution of the data points. If the data points are approximately uniformly distributed, then the time taken should be only . At worst
time will be required.
10
Example
This program evaluates the function
at a set of
randomly generated data points and calls
e01tkc to construct an interpolating function
. It then calls
e01tlc to evaluate the interpolant at a set of random points.
To reduce the time taken by this example, the number of data points is limited to . Increasing this value improves the interpolation accuracy at the expense of more time.
See also
Section 10 in
e01tkc.
10.1
Program Text
10.2
Program Data
10.3
Program Results