NAG Library Routine Document
E01TLF
1 Purpose
E01TLF evaluates the four-dimensional interpolating function generated by
E01TKF and its first partial derivatives.
2 Specification
INTEGER |
M, IQ(2*M+1), N, IFAIL |
REAL (KIND=nag_wp) |
X(4,M), F(M), RQ(15*M+9), XE(4,N), Q(N), QX(4,N) |
|
3 Description
E01TLF takes as input the interpolant
,
of a set of scattered data points
, for
, as computed by
E01TKF, and evaluates the interpolant and its first partial derivatives at the set of points
, for
.
E01TLF must only be called after a call to
E01TKF.
E01TLF 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 Parameters
- 1: – INTEGERInput
-
On entry:
must be the same value supplied for parameter
M in the preceding call to
E01TKF.
Constraint:
.
- 2: – REAL (KIND=nag_wp) arrayInput
-
Note: the coordinates of are stored in .
On entry:
must be the same array supplied as parameter
X in the preceding call to
E01TKF. It
must remain unchanged between calls.
- 3: – REAL (KIND=nag_wp) arrayInput
-
On entry:
must be the same array supplied as parameter
F in the preceding call to
E01TKF. It
must remain unchanged between calls.
- 4: – INTEGER arrayInput
-
On entry:
must be the same array returned as parameter
IQ in the preceding call to
E01TKF. It
must remain unchanged between calls.
- 5: – REAL (KIND=nag_wp) arrayInput
-
On entry:
must be the same array returned as parameter
RQ in the preceding call to
E01TKF. It
must remain unchanged between calls.
- 6: – INTEGERInput
-
On entry: , the number of evaluation points.
Constraint:
.
- 7: – REAL (KIND=nag_wp) arrayInput
-
On entry: must be set to the evaluation point , for .
- 8: – REAL (KIND=nag_wp) arrayOutput
-
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
X02ALF), and E01TLF returns with
.
- 9: – REAL (KIND=nag_wp) arrayOutput
-
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
X02ALF), and E01TLF returns with
.
- 10: – INTEGERInput/Output
-
On entry:
IFAIL must be set to
,
. If you are unfamiliar with this parameter you should refer to
Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
.
When the value is used it is essential to test the value of IFAIL on exit.
On exit:
unless the routine detects an error or a warning has been flagged (see
Section 6).
6 Error Indicators and Warnings
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Errors or warnings detected by the routine:
-
On entry, .
Constraint: .
On entry, .
Constraint: .
-
On entry, values in
IQ appear to be invalid. Check that
IQ has not been corrupted between calls to
E01TKF and E01TLF.
On entry, values in
RQ appear to be invalid. Check that
RQ has not been corrupted between calls to
E01TKF and E01TLF.
-
On entry, at least one evaluation point lies outside the region of
definition of the interpolant. At all such points the corresponding
values in
Q and
QX have been set to
:
.
An unexpected error has been triggered by this routine. Please
contact
NAG.
See
Section 3.8 in the Essential Introduction for further information.
Your licence key may have expired or may not have been installed correctly.
See
Section 3.7 in the Essential Introduction for further information.
Dynamic memory allocation failed.
See
Section 3.6 in the Essential Introduction for further information.
7 Accuracy
Computational errors should be negligible in most practical situations.
8 Parallelism and Performance
E01TLF is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
The time taken for a call to E01TLF 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
E01TKF to construct an interpolating function
. It then calls E01TLF 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 E01TKF.
10.1 Program Text
Program Text (e01tlfe.f90)
10.2 Program Data
Program Data (e01tlfe.d)
10.3 Program Results
Program Results (e01tlfe.r)