NAG Library Routine Document
E01EBF
1 Purpose
E01EBF performs barycentric interpolation, at a given set of points, using a set of function values on a scattered grid and a triangulation of that grid computed by
E01EAF.
2 Specification
INTEGER |
M, N, TRIANG(7*N), IFAIL |
REAL (KIND=nag_wp) |
X(N), Y(N), F(N), PX(M), PY(M), PF(M) |
|
3 Description
E01EBF takes as input a set of scattered data points
, for
, and a Thiessen triangulation of the
computed by
E01EAF, and interpolates at a set of points
, for
.
If the th interpolation point is equal to for some value of , the returned value will be equal to ; otherwise a barycentric transformation will be used to calculate the interpolant.
For each point , a triangle is sought which contains the point; the vertices of the triangle and values at the vertices are then used to compute the value .
If any interpolation point lies outside the triangulation defined by the input parameters, the returned value is the value provided, , at the closest node .
E01EBF must only be called after a call to
E01EAF.
4 References
Cline A K and Renka R L (1984) A storage-efficient method for construction of a Thiessen triangulation Rocky Mountain J. Math. 14 119–139
Lawson C L (1977) Software for surface interpolation Mathematical Software III (ed J R Rice) 161–194 Academic Press
Renka R L (1984) Algorithm 624: triangulation and interpolation of arbitrarily distributed points in the plane ACM Trans. Math. Software 10 440–442
Renka R L and Cline A K (1984) A triangle-based interpolation method Rocky Mountain J. Math. 14 223–237
5 Parameters
- 1: – INTEGERInput
-
On entry: , the number of points to interpolate.
Constraint:
.
- 2: – INTEGERInput
-
On entry:
, the number of data points.
N must be unchanged from the previous call of
E01EAF.
Constraint:
.
- 3: – REAL (KIND=nag_wp) arrayInput
- 4: – REAL (KIND=nag_wp) arrayInput
-
On entry: the coordinates of the
th data point,
, for
.
X and
Y must be unchanged from the previous call of
E01EAF.
- 5: – REAL (KIND=nag_wp) arrayInput
-
On entry: the function values
at , for .
- 6: – INTEGER arrayInput
-
On entry: the triangulation computed by the previous call of
E01EAF. See
Section 9 in E01EAF for details of how the triangulation used is encoded in
TRIANG.
- 7: – REAL (KIND=nag_wp) arrayInput
- 8: – REAL (KIND=nag_wp) arrayInput
-
On entry: the coordinates , for , at which interpolated function values are sought.
- 9: – REAL (KIND=nag_wp) arrayOutput
-
On exit: the interpolated values , for .
- 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, the triangulation information held in the array
TRIANG does not specify a valid triangulation of the data points.
TRIANG has been corrupted since the call to
E01EAF.
-
At least one evaluation point lies outside the nodal triangulation. For each such point the value returned in
PF is that corresponding to a node on the closest boundary line segment.
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
Not applicable.
8 Parallelism and Performance
Not applicable.
The time taken for a call of E01EBF is approximately proportional to the number of interpolation points, .
10 Example
See
Section 10 in E01EAF.