This routine
evaluates a two-dimensional Chebyshev polynomial for one or more arguments. It uses Clenshaw’
s
recurrence relationship twice.
CALL PDA_CHE2D( NPTS, XMIN, XMAX, X, YMIN, YMAX,
Y, XDEG, YDEG, NCOEF, CC, NW, WORK, EVAL, IFAIL )
XMIN = DOUBLE
PRECISION (Given)
The lower endpoint of the range of the fit along the first dimension. The
Chebyshev series representation is in terms of a normalised variable, evaluated as (2x - (XMAX
$+$ XMIN)
) / (XMAX - XMIN), where x is the original variable. XMIN must be less than XMAX.
XMAX =
DOUBLE PRECISION (Given)
The upper endpoint of the range of the fit along the second
dimension. See XMIN.
X( NPTS ) = DOUBLE PRECISION (Given)
The co-ordinates along the first
dimension for which the Chebyshev polynomial is to be evaluated.
YMIN = DOUBLE
PRECISION (Given)
The lower endpoint of the range of the fit along the first dimension. The
Chebyshev series representation is in terms of a normalised variable, evaluated as (2y - (YMAX
$+$ YMIN)
) / (YMAX - YMIN), where y is the original variable. YMIN must be less than YMAX.
YMAX = DOUBLE PRECISION (Given)
The upper endpoint of the range of the fit along
the second dimension. See YMIN.
Y = DOUBLE PRECISION (Given)
The co-ordinate
along the second dimension for which the Chebyshev polynomial is to be evaluated.
XDEG = INTEGER (Given)
The degree of the polynomial along the first dimension.
YDEG = INTEGER (Given)
The degree of the polynomial along the second dimension.
MCOEF = INTEGER (Given)
The number of coefficients. This must be at least the product of
(XDEG$+$1)
$\ast $
(YDEG$+$1).
CC( MCOEF
) = DOUBLE PRECISION (Given)
The Chebyshev coefficients. These should be the order such that CCij is in CC(
i$\ast $(YDEG$+$1)$+$j$+$1
) for i=0,XDEG; j=0,YDEG. In other words the opposite order to Fortran standard.
NW =
INTEGER (Given)
The number of elements in the work array. It must be at least XDEG
$+$ 1.
WORK( NW ) = DOUBLE PRECISION (Returned)
Workspace.
EVAL( NPTS ) = DOUBLE
PRECISION (Returned)
The evaluated polynomial for the supplied arguments. Should an element of
argument X lie beyond the range [XMIN,XMAX], IFAIL=7 is returned.
IFAIL = INTEGER (Returned)
The status. A value of 0 indicates that the routine completed successfully. Positive values indicate the
following errors:
IFAIL = 1 XMAX less than or equal to XMIN IFAIL = 2 YMAX less than or equal to YMIN IFAIL = 3 NCOEF
less than 1. IFAIL = 4 XDEG or YDEG less than 1. IFAIL = 5 Number of coefficients is too great, namely
(XDEG$+$1)$\ast $(YDEG$+$1)
is greater than NCOEF. IFAIL = 6 Y lies outside the range YMIN to YMAX. IFAIL = 7 An element of X
lies outside the range XMIN to XMAX.