Class inte_qawc_gsl (o2scl)¶
-
template<class
func_t
>
classo2scl
::
inte_qawc_gsl
: public o2scl::inte_cheb_gsl<func_t>¶ Adaptive Cauchy principal value integration (GSL)
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 inte_qag_gsl 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 inte_qawc_gsl::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 inte_cauchy_cern operates.See gslinte_subsect in the User’s guide for general information about the GSL integration classes.
- Idea for Future:
Make inte_cauchy_cern and this class consistent in the way which they require the user to provide the denominator in the integrand
Public Members
-
double
s
¶ The singularity.
Protected 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
-
const char *
type
()¶ Return string denoting type (“inte_qawc_gsl”)