gsl_inte_qag Class Template Reference

Adaptive integration a function with finite limits of integration (GSL). More...

#include <gsl_inte_qag.h>

Inheritance diagram for gsl_inte_qag:

gsl_inte_kronrod gsl_inte_table inte gsl_inte

Detailed Description

template<class param_t, class func_t = funct<param_t>>
class gsl_inte_qag< param_t, func_t >

Adaptive integration a function with finite limits of integration (GSL).

The number of subdivisions of the original interval which this class is allowed to make is dictated by the workspace size for the integration class, which can be set using gsl_inte_table::set_wkspace() .

There are a few possible normal errors:

There are also a few convergence errors which will not be called if inte::err_nonconv is false (the default is true)

Todo:
Verbose output has been setup for this class, but this needs to be done for some of the other GSL-like integrators
Things to document:
Document use of last_iter

Definition at line 85 of file gsl_inte_qag.h.


Public Member Functions

 gsl_inte_qag (int key=1)
 Create an integrator with the specified key.
int set_key (int key)
 Set the number of integration points.
int get_key ()
 Return the current value of the key being used used (1-6).
virtual double integ (func_t &func, double a, double b, param_t &pa)
 Integrate function func from a to b.
virtual int integ_err (func_t &func, double a, double b, param_t &pa, double &res, double &err2)
 Integrate function func from a to b and place the result in res and the error in err.
const char * type ()
 Return string denoting type ("gsl_inte_qag").

Protected Member Functions

int qag (func_t &func, const int qn, const double xgk[], const double wg[], const double wgk[], double fv1[], double fv2[], const double a, const double b, const double l_epsabs, const double l_epsrel, const size_t limit, double *result, double *abserr, param_t &pa)
 Perform an adaptive integration given the coefficients, and returning result.

Protected Attributes

int lkey
 Select the number of integration points.

Member Function Documentation

int set_key ( int  key  )  [inline]

Set the number of integration points.

The possible values for key are:

  • 1: GSL_INTEG_GAUSS15 (default)
  • 2: GSL_INTEG_GAUSS21
  • 3: GSL_INTEG_GAUSS31
  • 4: GSL_INTEG_GAUSS41
  • 5: GSL_INTEG_GAUSS51
  • 6: GSL_INTEG_GAUSS61

If an integer other than 1-6 is given, the default (GSL_INTEG_GAUSS15) is assumed, and the error handler is called.

Definition at line 123 of file gsl_inte_qag.h.


The documentation for this class was generated from the following file:

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page