concepts::Quadrature< type > Class Template Reference
Basic class for numerical integration. More...
#include <quadrature.hh>
Public Member Functions | |
const Real * | abscissas () const |
Returns a pointer into the array of the abscissas. More... | |
uint | n () const |
Returns the number of quadrature points. More... | |
Quadrature (uint n) | |
Constructor. More... | |
const Real * | weights () const |
Returns a pointer into the array of the weights. More... | |
Static Public Member Functions | |
static std::string | storedPoints () |
Lists the integration orders (points) which have been computed so far. More... | |
Protected Member Functions | |
virtual std::ostream & | info (std::ostream &os) const |
Returns information in an output stream. More... | |
Protected Attributes | |
Real * | abscissas_ |
Abscissas. More... | |
Real * | weights_ |
Weights. More... | |
Private Member Functions | |
bool | find_ () |
Private Attributes | |
uint | n_ |
Number of quadrature points. More... | |
Static Private Attributes | |
static std::map< uint, Real * > | abscissas_H |
Hash of the already computed values of the abscissas of this rule. More... | |
static std::map< uint, Real * > | weights_H |
Hash of the already computed values of the weights of this rule. More... | |
Detailed Description
template<int type>
class concepts::Quadrature< type >
Basic class for numerical integration.
This class provides the datastructures for the weights and abscissas and the methods to get them.
The values are computed in the template instantiations.
- Parameters
-
type Template parameter: type of the quadrature rule. Can take the values -
0: Gauss Lobatto quadrature. This rule includes both endpoints.
The abscissas are the zeros of and the weights are . -
1: Gauss Jacobi Lobatto quadrature. This rule includes both endpoints.
The abscissas are the zeros of and the weights are and . -
2: Gauss Jacobi Lobatto quadrature. This rule includes both endpoints.
The abscissas are the zeros of and the weights are and . -
3: Gauss Radau Jacobi quadrature. This rule includes only one of the endpoints, ie. -1.
The abscissas are the zeros of and the weights are . -
4: Gauss Jacobi quadrature. This rule does not include the endpoints -1 and 1.
The abscissas are the zeros of and the weights are -
5: Trapeze quadrature. This rule include the endpoints -1 and 1.
The abscissas are equidistant and the weights are
-
0: Gauss Lobatto quadrature. This rule includes both endpoints.
Requesting the same quadrature rule with the same amount of integration points several times does not harm: the values are only stored once (internally).
Definition at line 97 of file quadrature.hh.
Constructor & Destructor Documentation
◆ Quadrature()
concepts::Quadrature< type >::Quadrature | ( | uint | n | ) |
Constructor.
Computes the quadrature points.
- Parameters
-
n Number of entries to be computed
Member Function Documentation
◆ abscissas()
|
inline |
Returns a pointer into the array of the abscissas.
Definition at line 105 of file quadrature.hh.
◆ find_()
|
private |
◆ info()
|
protectedvirtual |
Returns information in an output stream.
Reimplemented from concepts::OutputOperator.
◆ n()
|
inline |
Returns the number of quadrature points.
Definition at line 109 of file quadrature.hh.
◆ storedPoints()
|
static |
Lists the integration orders (points) which have been computed so far.
- Returns
- a string containing the computed orders.
◆ weights()
|
inline |
Returns a pointer into the array of the weights.
Definition at line 107 of file quadrature.hh.
Member Data Documentation
◆ abscissas_
|
protected |
Abscissas.
Definition at line 119 of file quadrature.hh.
◆ abscissas_H
|
staticprivate |
Hash of the already computed values of the abscissas of this rule.
The hash is static, ie. the data is available to all instances of this class.
Definition at line 127 of file quadrature.hh.
◆ n_
|
private |
Number of quadrature points.
Definition at line 136 of file quadrature.hh.
◆ weights_
|
protected |
Weights.
Definition at line 121 of file quadrature.hh.
◆ weights_H
|
staticprivate |
Hash of the already computed values of the weights of this rule.
The hash is static, ie. the data is available to all instances of this class.
Definition at line 133 of file quadrature.hh.
The documentation for this class was generated from the following file:
- integration/quadrature.hh