|
|
◆ qawf_r()
| void qawf_r |
( |
double |
a, |
|
|
double |
omega, |
|
|
int |
integr, |
|
|
double |
epsabs, |
|
|
int |
limlst, |
|
|
int |
limit, |
|
|
int |
maxp1, |
|
|
double * |
result, |
|
|
double * |
abserr, |
|
|
int * |
neval, |
|
|
int * |
lst, |
|
|
double |
work[], |
|
|
int |
lwork, |
|
|
int |
iwork[], |
|
|
int |
liwork, |
|
|
int * |
info, |
|
|
double * |
xx, |
|
|
double |
yy, |
|
|
int * |
irev |
|
) |
| |
Semi-infinite interval adaptive quadrature for Fourier integrals (25-point Clenshaw-Curtis and 15-point Gauss-Kronrod rule) (reverse communication version)
- Purpose
- The routine calculates an approximation result to a Fourier integral I = ∫ f(x)*w(x) dx over [a, +∞] satisfying the requested accuracy, where the weight function w(x) = cos(ω*x) or sin(ω*x).
Result is obtained by the adaptive integration applying a 25-point modified Clenshaw-Curtis rule and a 15-point Gauss-Kronrod rule to satisfy the requested accuracy.
- Parameters
-
| [in] | a | Lower limit of integration. |
| [in] | omega | Parameter ω in the weight function. |
| [in] | integr | Indicates which weight function is to be used.
= 1: w(x) = cos(ω*x)
= 2: w(x) = sin(ω*x) |
| [in] | epsabs | Absolute accuracy requested. (epsabs > 0) |
| [in] | limlst | Upper bound on the number of cycles. (limlst >= 3) |
| [in] | limit | Upper bound on the subintervals allowed in the partition of each cycle. (limit >= 1) |
| [in] | maxp1 | Upper bound on the number of Chebyshev moments which can be stored. (maxp1 >= 1)
For the intervals of lengths abs(b-a)*2^(-L), L = 0, 1, ..., maxp1-2. |
| [out] | result | Approximation to I = integral of f(x)*w(x) over [a, +∞]. |
| [out] | abserr | Estimate of the modulus of the absolute error, which should equal or exceed the true error. |
| [out] | neval | Number of integrand evaluations. |
| [out] | lst | Number of cycles actually needed for the integration. |
| [out] | work[] | Array work[lwork]
Work array.
work[0], ..., work[lst-1]: The integral approximations over the cycles.
work[limlst], ..., work[limlst+lst-1]: The error estimates over the cycles.
Further elements of work[] have no specific meaning for the user. |
| [in] | lwork | The length of work[]. (lwork >= 2*limlst + 4*limit + 25*maxp1) |
| [out] | iwork[] | Array iwork[liwork]
Work array.
iwork[k] for k = 0, 1, ..., lst-1 contain the error flags on the cycles. |
| [in] | liwork | The length of iwork[]. (liwork >= limlst + 2*limit) |
| [out] | info | = 0: Successful exit
= -3: The argument integr had an illegal value (integr != 1 and integr != 2)
= -4: The argument epsabs had an illegal value (epsabs <= 0)
= -5: The argument limlst had an illegal value (limlst < 3)
= -6: The argument limit had an illegal value (limit < 1)
= -7: The argument maxp1 had an illegal value (maxp1 < 1)
= -13: The argument lwork had an illegal value (lwork < 2*limlst + 4*limit + 25*maxp1)
= -15: The argument liwork had an illegal value (lwork < limlst + 2*limit)
= 1: Maximum number of cycles allowed has been reached
= 4: The extrapolation table does not converge to within the requested accuracy
= 7: Bad integrand behaviour occurs within one or more of the cycles |
| [out] | xx | irev = 1 to 48: xx contains the abscissa where the function value should be evaluated and given in the next call. |
| [in] | yy | irev = 1 to 48: 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 tasks and call this routine again without changing irev.
= 0: Computation finished.
= 1 to 48: User should set the function value at xx in yy. Do not alter any variables other than yy. |
- Reference
- SLATEC (QUADPACK)
|