NAG FL Interface
e02jff (dim2_​spline_​ts_​evalm)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

e02jff calculates a mesh of values of a spline computed by e02jdf.

2 Specification

Fortran Interface
Subroutine e02jff ( nxeval, nyeval, xevalm, yevalm, coefs, fevalm, iopts, opts, ifail)
Integer, Intent (In) :: nxeval, nyeval, iopts(*)
Integer, Intent (Inout) :: ifail
Real (Kind=nag_wp), Intent (In) :: xevalm(nxeval), yevalm(nyeval), coefs(*), opts(*)
Real (Kind=nag_wp), Intent (Out) :: fevalm(nxeval,nyeval)
C Header Interface
#include <nag.h>
void  e02jff_ (const Integer *nxeval, const Integer *nyeval, const double xevalm[], const double yevalm[], const double coefs[], double fevalm[], const Integer iopts[], const double opts[], Integer *ifail)
The routine may be called by the names e02jff or nagf_fit_dim2_spline_ts_evalm.

3 Description

e02jff calculates values on a rectangular mesh of a bivariate spline computed by e02jdf. The points in the mesh are defined by x coordinates (xi), for i=1,2,,nx, and y coordinates (yj), for j=1,2,,ny. This routine is derived from the TSFIT package of O. Davydov and F. Zeilfelder.

4 References

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.

5 Arguments

1: nxeval Integer Input
On entry: nx, the number of values in the x direction forming the mesh on which the spline is to be evaluated.
Constraint: nxeval1.
2: nyeval Integer Input
On entry: ny, the number of values in the y direction forming the mesh on which the spline is to be evaluated.
Constraint: nyeval1.
3: xevalm(nxeval) Real (Kind=nag_wp) array Input
On entry: the (xi) values forming the mesh on which the spline is to be evaluated.
Constraint: for all i, xevalm(i) must lie inside, or on the boundary of, the spline's bounding box as determined by e02jdf.
4: yevalm(nyeval) Real (Kind=nag_wp) array Input
On entry: the (yj) values forming the mesh on which the spline is to be evaluated.
Constraint: for all j, yevalm(j) must lie inside, or on the boundary of, the spline's bounding box as determined by e02jdf.
5: coefs(*) Real (Kind=nag_wp) array Communication 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.
6: fevalm(nxeval,nyeval) Real (Kind=nag_wp) array Output
On exit: if ifail=0 on exit fevalm(i,j) contains the computed spline value at (xi,yj).
7: iopts(*) Integer array Communication 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 e02jff.
8: opts(*) Real (Kind=nag_wp) array Communication 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 e02jff.
9: ifail Integer Input/Output
On entry: ifail must be set to 0, -1 or 1 to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of 0 causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of -1 means that an error message is printed while a value of 1 means that it is not.
If halting is not appropriate, the value -1 or 1 is recommended. If message printing is undesirable, then the value 1 is recommended. Otherwise, the value 0 is recommended. When the value -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry 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:
ifail=6
On entry, nxeval=value.
Constraint: nxeval1.
ifail=7
On entry, nyeval=value.
Constraint: nyeval1.
ifail=9
Option arrays are not initialized or are corrupted.
ifail=10
The fitting routine has not been called, or the array of coefficients has been corrupted.
ifail=13
On entry, xevalm(value)=value was outside the bounding box.
Constraint: valuexevalm(i)value for all i.
ifail=14
On entry, yevalm(value)=value was outside the bounding box.
Constraint: valueyevalm(j)value for all j.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
ifail=-399
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

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

8 Parallelism and Performance

e02jff is not threaded in any implementation.

9 Further Comments

To evaluate a C1 approximation (i.e., when Global Smoothing Level=1), a real array of length O(1) is dynamically allocated by each invocation of e02jff. No memory is allocated internally when evaluating a C2 approximation.

10 Example

See e02jdf.