|
|
◆ pfqad()
| void pfqad |
( |
double(*)(double) |
f, |
|
|
int |
ldc, |
|
|
double |
c[], |
|
|
double |
xi[], |
|
|
int |
lxi, |
|
|
int |
k, |
|
|
int |
id, |
|
|
double |
x1, |
|
|
double |
x2, |
|
|
double |
tol, |
|
|
double * |
quad, |
|
|
int * |
info |
|
) |
| |
Integral of product of arbitrary function and PP (piecewise polynomial) form of B-spline
- 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] | f | User supplied subroutine which calculates the integrand function f(x) defined as follows. double f(double x)
{
return the value of f(x);
}
|
| [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
= -2: The argument ldc had an illegal value (ldc < k)
= -5: The argument lxi had an illegal value (lxi < 1)
= -6: The argument k had an illegal value (k < 1)
= -7: The argument id had an illegal value (id < 0 or id >= k)
= -10: 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 |
- Reference
- SLATEC
|