Flow123d  release_2.2.0-26-ge868538
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...
 
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 ith 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 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

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...
 

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.

Definition at line 31 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 104 of file quadrature.hh.

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

Copy constructor.

Definition at line 110 of file quadrature.hh.

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

Virtual destructor.

Definition at line 163 of file quadrature.hh.

Member Function Documentation

template<unsigned int dim>
const std::vector< arma::vec::fixed< dim > > & Quadrature< dim >::get_points ( ) const
inline

Return a reference to the whole array of quadrature points.

Definition at line 136 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 152 of file quadrature.hh.

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

Returns the ith quadrature point.

Definition at line 130 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 116 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 141 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 157 of file quadrature.hh.

Here is the caller graph for this function:

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

Returns number of quadrature points.

Definition at line 125 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 147 of file quadrature.hh.

Here is the caller graph for this function:

Member Data Documentation

template<unsigned int dim>
std::vector<arma::vec::fixed<dim> > Quadrature< dim >::quadrature_points
protected

List of quadrature points.

To be filled by the constructors of the derived classes.

Definition at line 90 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 97 of file quadrature.hh.


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