Flow123d
release_3.0.0-1073-g8f35d56
|
Base class for quadrature rules on simplices in arbitrary dimensions. More...
#include <fe_values.hh>
Public Member Functions | |
Quadrature (const unsigned int n_quadrature_points=0) | |
Constructor. More... | |
Quadrature (const Quadrature< dim > &q) | |
Copy constructor. More... | |
Quadrature (const Quadrature< dim-1 > &sub_quadrature, unsigned int sid, unsigned int pid) | |
Constructor from quadrature of lower dimension (e.g. for side integration). More... | |
virtual | ~Quadrature () |
Virtual destructor. More... | |
void | resize (const unsigned int n_q_points) |
Modify the number of quadrature points. More... | |
const unsigned int | size () const |
Returns number of quadrature points. More... | |
const arma::vec::fixed< dim > & | point (const unsigned int i) const |
Returns the i th quadrature point. More... | |
const std::vector< arma::vec::fixed< dim > > & | get_points () const |
Return a reference to the whole array of quadrature points. More... | |
void | set_point (const unsigned int i, const arma::vec::fixed< dim > &p) |
Sets individual quadrature point coordinates. More... | |
double | weight (const unsigned int i) const |
Returns the i th weight. More... | |
const std::vector< double > & | get_weights () const |
Return a reference to the whole array of weights. More... | |
void | set_weight (const unsigned int i, const double w) |
Sets individual quadrature weight. More... | |
Protected Attributes | |
std::vector< arma::vec::fixed< dim > > | 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 35 of file fe_values.hh.
Quadrature< dim >::Quadrature | ( | const unsigned int | n_quadrature_points = 0 | ) |
Constructor.
n_quadrature_points | Number of quadrature points to be allocated. |
Definition at line 118 of file quadrature.hh.
Quadrature< dim >::Quadrature | ( | const Quadrature< dim > & | q | ) |
Copy constructor.
Definition at line 124 of file quadrature.hh.
|
inline |
Constructor from quadrature of lower dimension (e.g. for side integration).
sub_quadrature | lower dimnesional (dim-1) quadrature |
sid | local index of side |
pid | index of permutation of nodes on given side |
Definition at line 181 of file quadrature.hh.
|
virtual |
Virtual destructor.
Definition at line 177 of file quadrature.hh.
|
inline |
Return a reference to the whole array of quadrature points.
Definition at line 150 of file quadrature.hh.
|
inline |
Return a reference to the whole array of weights.
Definition at line 166 of file quadrature.hh.
|
inline |
Returns the i
th quadrature point.
Definition at line 144 of file quadrature.hh.
void Quadrature< dim >::resize | ( | const unsigned int | n_q_points | ) |
Modify the number of quadrature points.
n_q_points | New number of quadrature points. |
Definition at line 130 of file quadrature.hh.
|
inline |
Sets individual quadrature point coordinates.
i | Number of the quadrature point. |
p | New coordinates. |
Definition at line 155 of file quadrature.hh.
|
inline |
Sets individual quadrature weight.
Definition at line 171 of file quadrature.hh.
|
inline |
Returns number of quadrature points.
Definition at line 139 of file quadrature.hh.
|
inline |
Returns the i
th weight.
Definition at line 161 of file quadrature.hh.
|
protected |
List of quadrature points.
To be filled by the constructors of the derived classes.
Definition at line 104 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 111 of file quadrature.hh.