OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
GSLIntegration.h File Reference
#include <cmath>
#include <functional>
#include <vector>
Include dependency graph for GSLIntegration.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  gsl_integration_workspace
 Workspace for adaptive integration routines. More...
 
struct  gsl_function
 Function wrapper used by integration routines. More...
 

Functions

gsl_integration_workspacegsl_integration_workspace_alloc (size_t n)
 Allocate integration workspace with limit \(n\).
 
void gsl_integration_workspace_free (gsl_integration_workspace *w)
 Free a workspace allocated by gsl_integration_workspace_alloc.
 
int gsl_integration_qag (const gsl_function *f, double a, double b, double epsabs, double epsrel, size_t, int, gsl_integration_workspace *, double *result, double *abserr)
 Adaptive integration on \([a,b]\) using Simpson refinement.
 

Variables

constexpr int GSL_INTEG_GAUSS15 = 1
 Integration rule identifiers (accepted but not used in this implementation).
 
constexpr int GSL_INTEG_GAUSS21 = 2
 
constexpr int GSL_INTEG_GAUSS31 = 3
 
constexpr int GSL_INTEG_GAUSS41 = 4
 
constexpr int GSL_INTEG_GAUSS51 = 5
 
constexpr int GSL_INTEG_GAUSS61 = 6
 

Function Documentation

◆ gsl_integration_qag()

int gsl_integration_qag ( const gsl_function f,
double  a,
double  b,
double  epsabs,
double  epsrel,
size_t  ,
int  ,
gsl_integration_workspace ,
double *  result,
double *  abserr 
)
inline

Adaptive integration on \([a,b]\) using Simpson refinement.

See also
https://www.gnu.org/software/gsl/doc/html/integration.html

Computes an approximation of \(\int_a^b f(x)\,dx\) with absolute tolerance epsabs and relative tolerance epsrel.

Parameters
fInput: integrand.
aInput: lower limit.
bInput: upper limit.
epsabsInput: absolute error tolerance.
epsrelInput: relative error tolerance.
limitInput: maximum subintervals (unused).
keyInput: quadrature rule selector (unused).
workspaceInput: workspace (unused).
resultOutput: estimated integral value.
abserrOutput: estimated absolute error.
Returns
Output: 0 on success.

Definition at line 121 of file GSLIntegration.h.

References gsl_function::function, and gsl_function::params.

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ gsl_integration_workspace_alloc()

gsl_integration_workspace * gsl_integration_workspace_alloc ( size_t  n)
inline

Allocate integration workspace with limit \(n\).

See also
https://www.gnu.org/software/gsl/doc/html/integration.html
Parameters
nInput: maximum number of subintervals.
Returns
Output: pointer to newly allocated workspace.

Definition at line 47 of file GSLIntegration.h.

References gsl_integration_workspace::alist, gsl_integration_workspace::blist, gsl_integration_workspace::elist, gsl_integration_workspace::limit, gsl_integration_workspace::order, and gsl_integration_workspace::rlist.

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ gsl_integration_workspace_free()

void gsl_integration_workspace_free ( gsl_integration_workspace w)
inline

Free a workspace allocated by gsl_integration_workspace_alloc.

See also
https://www.gnu.org/software/gsl/doc/html/integration.html
Parameters
wInput: workspace to release (can be null).

Definition at line 61 of file GSLIntegration.h.

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

Variable Documentation

◆ GSL_INTEG_GAUSS15

constexpr int GSL_INTEG_GAUSS15 = 1
constexpr

Integration rule identifiers (accepted but not used in this implementation).

Definition at line 140 of file GSLIntegration.h.

Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ GSL_INTEG_GAUSS21

constexpr int GSL_INTEG_GAUSS21 = 2
constexpr

Definition at line 141 of file GSLIntegration.h.

◆ GSL_INTEG_GAUSS31

constexpr int GSL_INTEG_GAUSS31 = 3
constexpr

Definition at line 142 of file GSLIntegration.h.

◆ GSL_INTEG_GAUSS41

constexpr int GSL_INTEG_GAUSS41 = 4
constexpr

Definition at line 143 of file GSLIntegration.h.

◆ GSL_INTEG_GAUSS51

constexpr int GSL_INTEG_GAUSS51 = 5
constexpr

Definition at line 144 of file GSLIntegration.h.

◆ GSL_INTEG_GAUSS61

constexpr int GSL_INTEG_GAUSS61 = 6
constexpr

Definition at line 145 of file GSLIntegration.h.