Class inte_qawo_gsl_sin (o2scl)

O2scl : Class List

template<class func_t>
class inte_qawo_gsl_sin : public o2scl::inte_cheb_gsl<func_t>

Adaptive integration for oscillatory integrals (GSL)

The integral

\[ \int_a^b f(x) \sin (\omega x)~dx \]
is computed for some frequency parameter \( \omega \), stored in o2scl::inte_qawo_gsl_sin::omega .

An adaptive algorithm together with an series-acceleration method like that of o2scl::inte_qags_gsl is used. Those subintervals with “large” widths \( d \equiv b-a \) where \( d\omega > 4 \) are computed using a 25-point Clenshaw-Curtis integration rule to handle the oscillatory behavior. In order to work efficiently, the Chebyshev moments for the particular weight function \( W \) are computed in advance.

See GSL-based integration details in the User’s guide for general information about the GSL integration classes.

Subclassed by o2scl::inte_qawf_gsl_sin< func_t >, o2scl::inte_qawo_gsl_cos< func_t >

Public Functions

inline inte_qawo_gsl_sin()
inline virtual ~inte_qawo_gsl_sin()
inline virtual int integ_err(func_t &func, double a, double b, double &res, double &err)

Integrate function func from a to b and place the result in res and the error in err.

Public Members

double omega

The user-specified frequency (default 1.0)

size_t n_levels

The number of bisection levels (default 10)

Protected Functions

inline int qawo(func_t &func, const double a, const double epsabs, const double epsrel, inte_workspace_gsl *loc_w, gsl_integration_qawo_table *wf, double *result, double *abserr)

The full GSL integration routine called by integ_err()

Idea for Future:

Remove goto statements.

inline void qc25f(func_t &func, double a, double b, gsl_integration_qawo_table *wf, size_t level, double *result, double *abserr, double *resabs, double *resasc)

25-point quadrature for oscillating functions

inline virtual double transform(double t, func_t &func)

Add the oscillating part to the integrand.

inline virtual const char *type()

Return string denoting type (“inte_qawo_gsl_sin”)

Protected Attributes

gsl_integration_qawo_table *otable

The integration workspace.