Flow123d  release_3.0.0-1157-gd246670
Public Member Functions | Protected Attributes | List of all members
Quadrature< dim > Class Template Reference

Base class for quadrature rules on simplices in arbitrary dimensions. More...

#include <fe_values.hh>

Inheritance diagram for Quadrature< dim >:
Inheritance graph
[legend]
Collaboration diagram for Quadrature< dim >:
Collaboration graph
[legend]

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...
 
arma::vec::fixed< dim > point (const unsigned int i) const
 Returns the ith quadrature point. More...
 
const Armor::arrayget_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 ith 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

Armor::array quadrature_points
 List of quadrature points. More...
 
std::vector< double > weights
 List of weights to the quadrature points. More...
 

Detailed Description

template<unsigned int dim>
class Quadrature< dim >

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 $E$ we have:

\[ \int_E f(x)\,dx \approx \sum_{i=1}^{N} w_i f(p_i), \]

where $\{w_i\}$, $\{p_i\}$ are the quadrature weights and the quadrature points, respectively.

TODO:

Definition at line 35 of file fe_values.hh.

Constructor & Destructor Documentation

template<unsigned int dim>
Quadrature< dim >::Quadrature ( const unsigned int  n_quadrature_points = 0)

Constructor.

Parameters
n_quadrature_pointsNumber of quadrature points to be allocated.

Definition at line 121 of file quadrature.hh.

Here is the caller graph for this function:

template<unsigned int dim>
Quadrature< dim >::Quadrature ( const Quadrature< dim > &  q)

Copy constructor.

Definition at line 127 of file quadrature.hh.

template<unsigned int dim>
Quadrature< dim >::Quadrature ( const Quadrature< dim-1 > &  sub_quadrature,
unsigned int  sid,
unsigned int  pid 
)
inline

Constructor from quadrature of lower dimension (e.g. for side integration).

Parameters
sub_quadraturelower dimnesional (dim-1) quadrature
sidlocal index of side
pidindex of permutation of nodes on given side

Definition at line 182 of file quadrature.hh.

template<unsigned int dim>
Quadrature< dim >::~Quadrature ( )
virtual

Virtual destructor.

Definition at line 178 of file quadrature.hh.

Member Function Documentation

template<unsigned int dim>
const Armor::array & Quadrature< dim >::get_points ( ) const
inline

Return a reference to the whole array of quadrature points.

Definition at line 151 of file quadrature.hh.

template<unsigned int dim>
const std::vector< double > & Quadrature< dim >::get_weights ( ) const
inline

Return a reference to the whole array of weights.

Definition at line 167 of file quadrature.hh.

template<unsigned int dim>
arma::vec::fixed< dim > Quadrature< dim >::point ( const unsigned int  i) const
inline

Returns the ith quadrature point.

Definition at line 145 of file quadrature.hh.

Here is the caller graph for this function:

template<unsigned int dim>
void Quadrature< dim >::resize ( const unsigned int  n_q_points)

Modify the number of quadrature points.

Parameters
n_q_pointsNew number of quadrature points.

Definition at line 133 of file quadrature.hh.

Here is the caller graph for this function:

template<unsigned int dim>
void Quadrature< dim >::set_point ( const unsigned int  i,
const arma::vec::fixed< dim > &  p 
)
inline

Sets individual quadrature point coordinates.

Parameters
iNumber of the quadrature point.
pNew coordinates.

Definition at line 156 of file quadrature.hh.

Here is the caller graph for this function:

template<unsigned int dim>
void Quadrature< dim >::set_weight ( const unsigned int  i,
const double  w 
)
inline

Sets individual quadrature weight.

Definition at line 172 of file quadrature.hh.

template<unsigned int dim>
const unsigned int Quadrature< dim >::size ( ) const
inline

Returns number of quadrature points.

Definition at line 140 of file quadrature.hh.

Here is the caller graph for this function:

template<unsigned int dim>
double Quadrature< dim >::weight ( const unsigned int  i) const
inline

Returns the ith weight.

Definition at line 162 of file quadrature.hh.

Here is the caller graph for this function:

Member Data Documentation

template<unsigned int dim>
Armor::array Quadrature< dim >::quadrature_points
protected

List of quadrature points.

To be filled by the constructors of the derived classes.

Definition at line 107 of file quadrature.hh.

template<unsigned int dim>
std::vector<double> Quadrature< dim >::weights
protected

List of weights to the quadrature points.

To be filled by the constructors of the derived classes.

Definition at line 114 of file quadrature.hh.


The documentation for this class was generated from the following files: