Flow123d
JS_before_hm-2212-gb8d94e0c1
|
Base class for quadrature rules on simplices in arbitrary dimensions. More...
#include <quadrature.hh>
Public Member Functions | |
Quadrature (const Quadrature &q) | |
Copy constructor. More... | |
Quadrature (unsigned int dimension, unsigned int n_quadrature_points=0) | |
Constructor. More... | |
virtual | ~Quadrature () |
Constructor from quadrature of lower dimension (e.g. for side integration). More... | |
unsigned int | dim () const |
void | resize (unsigned int n_q_points) |
Modify the number of quadrature points. More... | |
unsigned int | size () const |
Returns number of quadrature points. More... | |
template<unsigned int point_dim> | |
Armor::ArmaVec< double, point_dim > | point (unsigned int i) const |
Returns the i th quadrature point. More... | |
Armor::Array< double >::ArrayMatSet | set (uint i) |
const Armor::Array< double > & | get_points () const |
Return a reference to the whole array of quadrature points. More... | |
double | weight (unsigned int i) const |
Returns the i th weight. More... | |
double & | weight (unsigned int i) |
Returns the i th weight (non-const version). More... | |
const std::vector< double > & | get_weights () const |
Return a reference to the whole array of weights. More... | |
Quadrature & | operator= (const Quadrature &q) |
template<unsigned int bulk_dim> | |
Quadrature | make_from_side (unsigned int sid) const |
template<> | |
Quadrature | make_from_side (unsigned int sid) const |
Protected Attributes | |
const unsigned int | dim_ |
Dimension of quadrature points. More... | |
Armor::Array< double > | quadrature_points |
List of quadrature points. More... | |
std::vector< double > | weights |
List of weights to the quadrature points. More... | |
Base class for quadrature rules on simplices in arbitrary dimensions.
This class stores quadrature points and weights on the reference line, triangle or tetrahedron, respectively. Quadrature rules are used for evaluation of integrals over elements. In particular, for a reference element we have:
where , are the quadrature weights and the quadrature points, respectively.
TODO:
Definition at line 48 of file quadrature.hh.
Quadrature::Quadrature | ( | const Quadrature & | q | ) |
Copy constructor.
Definition at line 39 of file quadrature.cc.
Quadrature::Quadrature | ( | unsigned int | dimension, |
unsigned int | n_quadrature_points = 0 |
||
) |
Constructor.
n_quadrature_points | Number of quadrature points to be allocated. |
Definition at line 32 of file quadrature.cc.
|
inlinevirtual |
Constructor from quadrature of lower dimension (e.g. for side integration).
sub_quadrature | lower dimensional (dim-1) quadrature |
sid | local index of side Virtual destructor. |
Definition at line 68 of file quadrature.hh.
|
inline |
|
inline |
Return a reference to the whole array of quadrature points.
Definition at line 103 of file quadrature.hh.
|
inline |
Return a reference to the whole array of weights.
Definition at line 115 of file quadrature.hh.
template Quadrature Quadrature::make_from_side< 3 > | ( | unsigned int | sid | ) | const |
Definition at line 71 of file quadrature.cc.
Quadrature Quadrature::make_from_side | ( | unsigned int | sid | ) | const |
Create bulk quadrature from side quadrature.
Consider *this as quadrature on a side of an element and create higher dimensional quadrature considering side index.
Definition at line 47 of file quadrature.cc.
Quadrature & Quadrature::operator= | ( | const Quadrature & | q | ) |
Definition at line 23 of file quadrature.cc.
|
inline |
Returns the i
th quadrature point.
Definition at line 91 of file quadrature.hh.
|
inline |
Modify the number of quadrature points.
n_q_points | New number of quadrature points. |
Definition at line 79 of file quadrature.hh.
|
inline |
|
inline |
Returns number of quadrature points.
Definition at line 86 of file quadrature.hh.
|
inline |
Returns the i
th weight (non-const version).
Definition at line 111 of file quadrature.hh.
|
inline |
Returns the i
th weight.
Definition at line 107 of file quadrature.hh.
|
protected |
Dimension of quadrature points.
Definition at line 133 of file quadrature.hh.
|
protected |
List of quadrature points.
To be filled by the constructors of the derived classes.
Definition at line 140 of file quadrature.hh.
|
protected |
List of weights to the quadrature points.
To be filled by the constructors of the derived classes.
Definition at line 147 of file quadrature.hh.