PARTONS/NumA++
|
Numerical Analysis C++ routines
|
![]() |
Abstract quadrature class (for fixed quadrature rules). More...
Public Member Functions | |
QuadratureIntegrator1D (unsigned int N=0) | |
Constructor. More... | |
virtual | ~QuadratureIntegrator1D () |
Default destructor. More... | |
virtual QuadratureIntegrator1D * | clone () const =0 |
virtual double | integrate (FunctionType1D *pFunction, double a, double b, std::vector< double > ¶meters) |
Integration routine. More... | |
virtual void | configure (const ElemUtils::Parameters ¶meters) |
Provides a generic method to configure all types of integrations by passing a Parameters object. More... | |
unsigned int | getN () const |
virtual void | setN (unsigned int n)=0 |
const std::vector< double > & | getNodes () const |
const std::vector< double > & | getWeights () const |
![]() | |
Integrator1D () | |
Default constructor. More... | |
virtual | ~Integrator1D () |
Default destructor. More... | |
const Tolerances & | getTolerances () const |
void | setTolerances (const Tolerances &tolerances) |
const Errors & | getErrors () const |
void | setErrors (const Errors &errors) |
Static Public Attributes | |
static const std::string | PARAM_NAME_N = "numberOfNodes" |
Parameter used in the configure() to set the order of the quadrature. More... | |
![]() | |
static const std::string | PARAM_NAME_ABSOLUTE_TOLERANCE |
Parameter used in the configure() to set the absolute tolerance. More... | |
static const std::string | PARAM_NAME_RELATIVE_TOLERANCE |
Parameter used in the configure() to set the relative tolerance. More... | |
Protected Member Functions | |
QuadratureIntegrator1D (const QuadratureIntegrator1D &other) | |
Copy constructor. More... | |
![]() | |
Integrator1D (const Integrator1D &other) | |
Copy constructor. More... | |
Protected Attributes | |
unsigned int | m_N |
Order of the quadrature (number of nodes). More... | |
std::vector< double > | m_nodes |
Nodes of the quadrature. More... | |
std::vector< double > | m_weights |
Weights of the quadrature. More... | |
![]() | |
Tolerances | m_tolerances |
Absolute and relative tolerances. More... | |
Errors | m_errors |
Absolute and relative errors estimations. More... | |
Additional Inherited Members | |
![]() | |
template<typename PointerToObj , typename PointerToMemFn > | |
static Functor1D< PointerToObj, PointerToMemFn > * | newIntegrationFunctor (PointerToObj *object, PointerToMemFn function) |
Use FunctorUtils::newFunctor1D instead. More... | |
static Integrator1D * | newIntegrator (const IntegratorType1D::Type &oneDimIntegratorType) |
Instantiates an Integrator object. More... | |
Abstract quadrature class (for fixed quadrature rules).
Child classes must define a way to compute the nodes \( x_i \) and weights \( w_i \).
The integration itself is done by this abstract class: \( \displaystyle \int_a^b f\left(x\right) \mathrm{d}x = \sum_{i=0}^{N-1} w_i f\left(x_i\right) \), through the integrate() routine.
See Integrator1D documentation for an example.
NumA::QuadratureIntegrator1D::QuadratureIntegrator1D | ( | unsigned int | N = 0 | ) |
Constructor.
N | Order of the quadrature (number of nodes). |
|
virtual |
Default destructor.
|
protected |
|
pure virtual |
|
virtual |
Provides a generic method to configure all types of integrations by passing a Parameters object.
Parameters class represents a list of couples key/value (see Parameters class documentation for more info).
parameters | ElemUtils::Parameters object. |
Reimplemented from NumA::Integrator1D.
Reimplemented in NumA::TrapezoidalLogIntegrator1D.
unsigned int NumA::QuadratureIntegrator1D::getN | ( | ) | const |
const std::vector< double > & NumA::QuadratureIntegrator1D::getNodes | ( | ) | const |
const std::vector< double > & NumA::QuadratureIntegrator1D::getWeights | ( | ) | const |
|
virtual |
Integration routine.
pFunction | Functor representing the one-dimensional function to integrate. |
a | Lower bound. |
b | Upper bound. |
parameters | Parameters that can be passed to the function. |
Implements NumA::Integrator1D.
Reimplemented in NumA::TrapezoidalLogIntegrator1D.
|
pure virtual |
n | Order of the quadrature (number of nodes). |
Implemented in NumA::TrapezoidalLogIntegrator1D, NumA::TrapezoidalIntegrator1D, NumA::GaussLegendreSeStIntegrator1D, NumA::GaussLegendreIntegrator1D, NumA::ChebyshevBIntegrator1D, and NumA::ChebyshevAIntegrator1D.
|
protected |
Order of the quadrature (number of nodes).
|
protected |
Nodes of the quadrature.
|
protected |
Weights of the quadrature.
|
static |
Parameter used in the configure() to set the order of the quadrature.