Object-oriented Scientific Computing Library: Version 0.910
Public Member Functions | Data Fields | Protected Member Functions
gsl_inte_qawc< func_t > Class Template Reference

Adaptive Cauchy principal value integration (GSL) More...

#include <gsl_inte_qawc.h>

Inheritance diagram for gsl_inte_qawc< func_t >:
gsl_inte_cheb< func_t > gsl_inte_transform< func_t > gsl_inte_singular< func_t > gsl_inte_kronrod< func_t > gsl_inte inte< func_t >

Detailed Description

template<class func_t>
class gsl_inte_qawc< func_t >

The Cauchy principal value of the integral of

\[ \int_a^b \frac{f(x)}{x-c}~dx = \lim_{\epsilon\to 0^+} \left\{ \int_a^{c-\epsilon} \frac{f(x)}{x-c}~dx + \int_{c+\epsilon}^b \frac{f(x)}{x-c}~dx \right\}. \]

over $ (a,b), $ with a singularity at $ c, $ is computed. The adaptive refinement algorithm described for gsl_inte_qag is used with modifications to ensure that subdivisions do not occur at the singular point $ x = c$ . When a subinterval contains the point $ x = c $ or is close to it, a special 25-point modified Clenshaw-Curtis rule is used to control the singularity. Further away from the singularity the algorithm uses a Gauss-Kronrod integration rule.

The location of the singularity must be specified before-hand in gsl_inte_qawc::s, and the singularity must not be at one of the endpoints. Note that when integrating a function of the form $ \frac{f(x)}{(x-s)} $, the denominator $ (x-s) $ must not be specified in the argument func to integ(). Note that this is different from how the cern_cauchy operates.

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

Idea for Future:
Make cern_cauchy and this class consistent in the way which they require the user to provide the denominator in the integrand

Definition at line 347 of file gsl_inte_qawc.h.

Public Member Functions

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.

Data Fields

double s
 The singularity.

Protected Member Functions

int qawc (func_t &func, const double a, const double b, const double c, const double epsabs, const double epsrel, double *result, double *abserr)
 The full GSL integration routine called by integ_err()
void qc25c (func_t &func, double a, double b, double c, double *result, double *abserr, int *err_reliable)
 25-point quadrature for Cauchy principal values
virtual double transform (double t, func_t &func)
 Add the singularity to the function.
const char * type ()
 Return string denoting type ("gsl_inte_qawc")

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.