Chaste  Release::2018.1
GaussianQuadratureRule< ELEMENT_DIM > Class Template Reference

#include <GaussianQuadratureRule.hpp>

+ Inheritance diagram for GaussianQuadratureRule< ELEMENT_DIM >:
+ Collaboration diagram for GaussianQuadratureRule< ELEMENT_DIM >:

Public Member Functions

 GaussianQuadratureRule (unsigned quadratureOrder)
 
const ChastePoint< ELEMENT_DIM > & rGetQuadPoint (unsigned index) const
 
double GetWeight (unsigned index) const
 
unsigned GetNumQuadPoints () const
 
template<>
 GaussianQuadratureRule (unsigned quadratureOrder)
 
template<>
 GaussianQuadratureRule (unsigned quadratureOrder)
 
template<>
 GaussianQuadratureRule (unsigned quadratureOrder)
 

Private Attributes

unsigned mNumQuadPoints
 
std::vector< ChastePoint
< ELEMENT_DIM > > 
mPoints
 
std::vector< doublemWeights
 

Detailed Description

template<unsigned ELEMENT_DIM>
class GaussianQuadratureRule< ELEMENT_DIM >

This class encapsulates tables of Gaussian quadrature points and the associated weights.

Data is available for 1d, 2d and 3d quadrature over (canonical) triangles, with appropriate numbers of Gauss points. Weights sum to 1 and are non-negative. The values are computed when an object is instantiated.

Definition at line 50 of file GaussianQuadratureRule.hpp.

Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM>
GaussianQuadratureRule< ELEMENT_DIM >::GaussianQuadratureRule ( unsigned  quadratureOrder)

The constructor builds the appropriate table for the dimension (given by the template argument) and number of points in each dimension (given as a constructor argument).

An exception is thrown if data is not available for the requested parameters.

Parameters
quadratureOrderThe minimum polynomial order that the rule can integrate exactly

Definition at line 282 of file GaussianQuadratureRule.cpp.

References EXCEPTION.

template<>
GaussianQuadratureRule< 0 >::GaussianQuadratureRule ( unsigned  quadratureOrder)

Constructor specialization for 0d.

Parameters
quadratureOrderThe minimum polynomial order that the rule can integrate exactly (ignored in 0-d case)

Definition at line 68 of file GaussianQuadratureRule.cpp.

template<>
GaussianQuadratureRule< 2 >::GaussianQuadratureRule ( unsigned  quadratureOrder)

Constructor specialization for 2d.

Parameters
quadratureOrderThe minimum polynomial order that the rule can integrate exactly

Definition at line 130 of file GaussianQuadratureRule.cpp.

References EXCEPTION.

template<>
GaussianQuadratureRule< 3 >::GaussianQuadratureRule ( unsigned  quadratureOrder)

Constructor specialization for 3d.

Parameters
quadratureOrderThe minimum polynomial order that the rule can integrate exactly

Definition at line 198 of file GaussianQuadratureRule.cpp.

References EXCEPTION.

Member Function Documentation

template<unsigned ELEMENT_DIM>
unsigned GaussianQuadratureRule< ELEMENT_DIM >::GetNumQuadPoints ( ) const
Returns
the number of quadrature points. This is the number of points in each dimension, raised to the power of the number of dimensions.

Definition at line 57 of file GaussianQuadratureRule.cpp.

Referenced by AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CalculateOnElement(), ElectrodesStimulusFactory< DIM >::ComputeElectrodeTotalFlux(), and QuadraturePointsGroup< DIM >::QuadraturePointsGroup().

template<unsigned ELEMENT_DIM>
double GaussianQuadratureRule< ELEMENT_DIM >::GetWeight ( unsigned  index) const
Returns
the weight associated with a quadrature point.
Parameters
indexThe index of the point to return.

Definition at line 50 of file GaussianQuadratureRule.cpp.

Referenced by AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CalculateOnElement(), and ElectrodesStimulusFactory< DIM >::ComputeElectrodeTotalFlux().

template<unsigned ELEMENT_DIM>
const ChastePoint< ELEMENT_DIM > & GaussianQuadratureRule< ELEMENT_DIM >::rGetQuadPoint ( unsigned  index) const

Get a quadrature point.

Parameters
indexThe index of the point to return.
Returns
A gaussian quadrature point.

Definition at line 43 of file GaussianQuadratureRule.cpp.

Referenced by AbstractFunctionalCalculator< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CalculateOnElement(), ElectrodesStimulusFactory< DIM >::ComputeElectrodeTotalFlux(), and QuadraturePointsGroup< DIM >::QuadraturePointsGroup().

Member Data Documentation

template<unsigned ELEMENT_DIM>
unsigned GaussianQuadratureRule< ELEMENT_DIM >::mNumQuadPoints
private

The total number of Gauss points.

Definition at line 53 of file GaussianQuadratureRule.hpp.

Referenced by GaussianQuadratureRule< 1 >::GaussianQuadratureRule().

template<unsigned ELEMENT_DIM>
std::vector<ChastePoint<ELEMENT_DIM> > GaussianQuadratureRule< ELEMENT_DIM >::mPoints
private

The gaussian quadrature points.

Definition at line 56 of file GaussianQuadratureRule.hpp.

Referenced by GaussianQuadratureRule< 1 >::GaussianQuadratureRule().

template<unsigned ELEMENT_DIM>
std::vector<double> GaussianQuadratureRule< ELEMENT_DIM >::mWeights
private

The associated weights.

Definition at line 59 of file GaussianQuadratureRule.hpp.

Referenced by GaussianQuadratureRule< 1 >::GaussianQuadratureRule().


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