e01ebc 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 e01eac.
The function may be called by the names: e01ebc, nag_interp_dim2_triang_bary_eval or nag_2d_triang_bary_eval.
3Description
e01ebc takes as input a set of scattered data points , for , and a Thiessen triangulation of the computed by e01eac, 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 arguments, the returned value is the value provided, , at the closest node .
e01ebc must only be called after a call to e01eac.
4References
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. Software10 440–442
Renka R L and Cline A K (1984) A triangle-based interpolation method Rocky Mountain J. Math.14 223–237
5Arguments
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 e01eac.
Constraint:
.
3: – const doubleInput
4: – const doubleInput
On entry: the coordinates of the th data point, , for . x and y must be unchanged from the previous call of e01eac.
5: – const doubleInput
On entry: the function values
at , for .
6: – const IntegerInput
On entry: the triangulation computed by the previous call of e01eac. See Section 9 in e01eac for details of how the triangulation used is encoded in triang.
7: – const doubleInput
8: – const doubleInput
On entry: the coordinates , for , at which interpolated function values are sought.
9: – doubleOutput
On exit: the interpolated values , for .
10: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error 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_INT
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.
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_TRIANG_INVALID
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 e01eac.
NW_EXTRAPOLATION
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.
7Accuracy
Not applicable.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
e01ebc is not threaded in any implementation.
9Further Comments
The time taken for a call of e01ebc is approximately proportional to the number of interpolation points, .