|
|
◆ pfqad_r()
| void pfqad_r |
( |
int |
ldc, |
|
|
double |
c[], |
|
|
double |
xi[], |
|
|
int |
lxi, |
|
|
int |
k, |
|
|
int |
id, |
|
|
double |
x1, |
|
|
double |
x2, |
|
|
double |
tol, |
|
|
double * |
quad, |
|
|
int * |
info, |
|
|
double * |
xx, |
|
|
double |
yy, |
|
|
int * |
irev |
|
) |
| |
Integral of product of arbitrary function and PP (piecewise polynomial) form of B-spline (reverse communication version)
- Purpose
- This routine computes the integral on [x1, x2] of a product of a function f(x) and the id-th derivative of a k-th order B-spline, using the PP-representation (c[][], xi[], lxi, k). [x1, x2] is normally a subinterval of [xi[0], xi[lxi]].
The integration routine using adaptive 8-point Gauss-Legendre rule integrates the product on subintervals of [x1, x2] formed by included break points. Integration outside of [xi[0], xi[lxi]] is permitted provided f is defined.
- Parameters
-
| [in] | ldc | Leading dimension of two dimensional array stored in array c[] (ldc >= k) |
| [in] | c[] | Array c[lc][ldc] (lc >= lxi)
Right derivatives at break points. |
| [in] | xi[] | Array xi[l_xi] (l_xi >= lxi + 1)
Break points. |
| [in] | lxi | Number of polynomial pieces. |
| [in] | k | Order of B-spline. (k >= 1) |
| [in] | id | Order of the spline derivative. (0 <= id <= k - 1)
id = 0 gives the spline function. |
| [in] | x1 | Lower end point of quadrature interval. (Normally xi[0] <= x1 <= xi[lxi]) |
| [in] | x2 | Upper end point of quadrature interval. (Normally xi[0] <= x1 <= xi[lxi]) |
| [in] | tol | Desired accuracy for the quadrature. (dtol < tol <= 0.1 where dtol is max(1.0e-18, double precision unit roundoff for the machine (= d1mach(4))). |
| [out] | quad | Integral of f(x)*(id-th derivative of a k-th order B-spline) on [x1, x2]. |
| [out] | info | = 0: Successful exit
= -1: The argument ldc had an illegal value (ldc < k)
= -4: The argument lxi had an illegal value (lxi < 1)
= -5: The argument k had an illegal value (k < 1)
= -6: The argument id had an illegal value (id < 0 or id >= k)
= -9: The argument tol had an illegal value (tol < dtol or tol > 0.1)
= 1: Some quadrature on [x1, x2] does not meet the requested tolerance |
| [out] | xx | When returned with irev=1 to 3, xx contains the abscissa where the function value shoule be evaluated and given in the next call. |
| [in] | yy | When returned with irev = 1 to 3, the function value f(xx) should be given in yy in the next call. |
| [in,out] | irev | Control variable for reverse communication.
[in] Before first call, irev should be initialized to zero. On succeeding calls, irev should not be altered.
[out] If irev is not zero, complete the following process and call this routine again.
= 0: Computation finished. See return code in info.
= 1 to 3: User should set the function value at xx (f(xx)) in yy. Do not alter any variables other than yy. |
- Reference
- SLATEC
|