NAG Library Routine Document

1Purpose

e02jef calculates a vector of values of a spline computed by e02jdf.

2Specification

Fortran Interface
 Subroutine e02jef ( opts,
 Integer, Intent (In) :: nevalv, iopts(*) Integer, Intent (Inout) :: ifail Real (Kind=nag_wp), Intent (In) :: xevalv(nevalv), yevalv(nevalv), coefs(*), opts(*) Real (Kind=nag_wp), Intent (Out) :: fevalv(nevalv)
#include <nagmk26.h>
 void e02jef_ (const Integer *nevalv, const double xevalv[], const double yevalv[], const double coefs[], double fevalv[], const Integer iopts[], const double opts[], Integer *ifail)

3Description

e02jef calculates values at prescribed points $\left({x}_{i},{y}_{i}\right)$, for $\mathit{i}=1,2,\dots ,n$, of a bivariate spline computed by e02jdf. It is derived from the TSFIT package of O. Davydov and F. Zeilfelder.

4References

Davydov O, Morandi R and Sestini A (2006) Local hybrid approximation for scattered data fitting with bivariate splines Comput. Aided Geom. Design 23 703–721
Davydov O, Sestini A and Morandi R (2005) Local RBF approximation for scattered data fitting with bivariate splines Trends and Applications in Constructive Approximation M. G. de Bruin, D. H. Mache, and J. Szabados, Eds ISNM Vol. 151 Birkhauser 91–102
Davydov O and Zeilfelder F (2004) Scattered data fitting by direct extension of local polynomials to bivariate splines Advances in Comp. Math. 21 223–271
Farin G and Hansford D (2000) The Essentials of CAGD Natic, MA: A K Peters, Ltd.

5Arguments

1:     $\mathbf{nevalv}$ – IntegerInput
On entry: $n$, the number of values at which the spline is to be evaluated.
Constraint: ${\mathbf{nevalv}}\ge 1$.
2:     $\mathbf{xevalv}\left({\mathbf{nevalv}}\right)$ – Real (Kind=nag_wp) arrayInput
On entry: the $\left({x}_{i}\right)$ values at which the spline is to be evaluated.
Constraint: for all $i$, ${\mathbf{xevalv}}\left(i\right)$ must lie inside, or on the boundary of, the spline's bounding box as determined by e02jdf.
3:     $\mathbf{yevalv}\left({\mathbf{nevalv}}\right)$ – Real (Kind=nag_wp) arrayInput
On entry: the $\left({y}_{i}\right)$ values at which the spline is to be evaluated.
Constraint: for all $i$, ${\mathbf{yevalv}}\left(i\right)$ must lie inside, or on the boundary of, the spline's bounding box as determined by e02jdf.
4:     $\mathbf{coefs}\left(*\right)$ – Real (Kind=nag_wp) arrayCommunication Array
Note: the dimension of this array is dictated by the requirements of associated functions that must have been previously called. This array must be the same array passed as argument coefs in the previous call to e02jdf.
On entry: the computed spline coefficients as output from e02jdf.
5:     $\mathbf{fevalv}\left({\mathbf{nevalv}}\right)$ – Real (Kind=nag_wp) arrayOutput
On exit: if ${\mathbf{ifail}}={\mathbf{0}}$ on exit ${\mathbf{fevalv}}\left(i\right)$ contains the computed spline value at $\left({x}_{i},{y}_{i}\right)$.
6:     $\mathbf{iopts}\left(*\right)$ – Integer arrayCommunication Array
Note: the dimension of this array is dictated by the requirements of associated functions that must have been previously called. This array must be the same array passed as argument iopts in the previous call to e02zkf.
On entry: the contents of the array must not have been modified either directly or indirectly, by a call to e02zkf, between calls to e02jdf and e02jef.
7:     $\mathbf{opts}\left(*\right)$ – Real (Kind=nag_wp) arrayCommunication Array
Note: the dimension of this array is dictated by the requirements of associated functions that must have been previously called. This array must be the same array passed as argument opts in the previous call to e02zkf.
On entry: the contents of the array must not have been modified either directly or indirectly, by a call to e02zkf, between calls to e02jdf and e02jef.
8:     $\mathbf{ifail}$ – IntegerInput/Output
On entry: ifail must be set to $0$, . If you are unfamiliar with this argument you should refer to Section 3.4 in How to Use the NAG Library and its Documentation 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 $1$ is recommended. Otherwise, if you are not familiar with this argument, the recommended value is $0$. When the value  is used it is essential to test the value of ifail on exit.
On exit: ${\mathbf{ifail}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see Section 6).

6Error Indicators and Warnings

If on entry ${\mathbf{ifail}}=0$ or $-1$, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
${\mathbf{ifail}}=2$
On entry, ${\mathbf{nevalv}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{nevalv}}\ge 1$.
${\mathbf{ifail}}=9$
Option arrays are not initialized or are corrupted.
${\mathbf{ifail}}=10$
The fitting routine has not been called, or the array of coefficients has been corrupted.
${\mathbf{ifail}}=13$
On entry, ${\mathbf{xevalv}}\left(〈\mathit{\text{value}}〉\right)=〈\mathit{\text{value}}〉$ was outside the bounding box.
Constraint: $〈\mathit{\text{value}}〉\le {\mathbf{xevalv}}\left(i\right)\le 〈\mathit{\text{value}}〉$ for all $i$.
${\mathbf{ifail}}=14$
On entry, ${\mathbf{yevalv}}\left(〈\mathit{\text{value}}〉\right)=〈\mathit{\text{value}}〉$ was outside the bounding box.
Constraint: $〈\mathit{\text{value}}〉\le {\mathbf{yevalv}}\left(i\right)\le 〈\mathit{\text{value}}〉$ for all $i$.
${\mathbf{ifail}}=-99$
See Section 3.9 in How to Use the NAG Library and its Documentation for further information.
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
See Section 3.8 in How to Use the NAG Library and its Documentation for further information.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 3.7 in How to Use the NAG Library and its Documentation for further information.

7Accuracy

e02jef uses the de Casteljau algorithm and thus is numerically stable. See Farin and Hansford (2000) for details.

8Parallelism and Performance

e02jef is not threaded in any implementation.

To evaluate a ${C}^{1}$ approximation (i.e., when ${\mathbf{Global Smoothing Level}}=1$), a real array of length $\mathit{O}\left(1\right)$ is dynamically allocated by each invocation of e02jef. No memory is allocated internally when evaluating a ${C}^{2}$ approximation.