![]() |
MechSys
1.0
Computing library for simulations in continuum and discrete mechanics
|
#include <quadrature.h>
Public Types | |
typedef double(Instance::* | pFun )(double x) const |
Callback function. | |
Public Member Functions | |
Quadrature (Instance const *p2Inst, pFun p2Fun, QMethod method=QAGS_T, double EPSREL=100.0 *DBL_EPSILON) | |
~Quadrature () | |
double | Integrate (double a, double b) |
Integrate F(x) in [a,b]. | |
double | CallFun (double x) |
Call F(x) | |
double | LastError () const |
Return the last error after an Integrate call. | |
Static Public Attributes | |
static int | WORKSPACE_SIZE = 10000 |
Workspace size. |
Numerical integration. Examples:
typedef double(Instance::* Numerical::Quadrature< Instance >::pFun)(double x) const |
Callback function.
Numerical::Quadrature< Instance >::Quadrature | ( | Instance const * | p2Inst, |
pFun | p2Fun, | ||
QMethod | method = QAGS_T , |
||
double | EPSREL = 100.0*DBL_EPSILON |
||
) | [inline] |
Constructor.
Numerical::Quadrature< Instance >::~Quadrature | ( | ) | [inline] |
Destructor.
double Numerical::Quadrature< Instance >::CallFun | ( | double | x | ) | [inline] |
Call F(x)
double Numerical::Quadrature< Instance >::Integrate | ( | double | a, |
double | b | ||
) | [inline] |
Integrate F(x) in [a,b].
double Numerical::Quadrature< Instance >::LastError | ( | ) | const [inline] |
Return the last error after an Integrate call.
int Numerical::Quadrature< Instance >::WORKSPACE_SIZE = 10000 [static] |
Workspace size.