Loading...
Searching...
No Matches
Dune::QuadratureRule< ct, dim > Class Template Reference
dune-geometry » Quadrature

Abstract base class for quadrature rules. More...

`#include <dune/geometry/quadraturerules.hh>`

Inheritance diagram for Dune::QuadratureRule< ct, dim >:

## Public Types

typedef ct | CoordType
| The type used for coordinates.
typedef std::vector< QuadraturePoint< ct, dim > >::const_iterator | iterator

## Public Member Functions

| QuadratureRule ()
| Default constructor.
virtual int | order () const
| return order
virtual GeometryType | type () const
| return type of element
virtual | ~QuadratureRule ()

## Public Attributes

T | elements
| STL member.

## Static Public Attributes

static constexpr int | d = dim
| The space dimension.

## Protected Member Functions

| QuadratureRule (GeometryType t)
| Constructor for a given geometry type. Leaves the quadrature order invalid.
| QuadratureRule (GeometryType t, int order)
| Constructor for a given geometry type and a given quadrature order.

## Protected Attributes

GeometryType | geometry_type
int | delivered_order

## Detailed Description

template<typename ct, int dim>
class Dune::QuadratureRule< ct, dim >

Abstract base class for quadrature rules.

Contains a list of QuadraturePoint used to integrate numerically a function with a domain given by the a GeometryType.

Usage:

auto f = [](FieldVector<ct,dim> x) -> double {...}; // function to integrate
QuadratureRule<ct,dim> quadrature = Dune::QuadratureRules<ct,dim>::rule(...); // obtain a quadrature rule
double integral = 0.;
for(auto [position, weight] : quadrature) // iterate over quadrature points
integral += f(position) * weight; // accumulate weighted results
Dune::QuadratureRule
Abstract base class for quadrature rules.
Definition quadraturerules.hh:214
Dune::QuadratureRules::rule
static const QuadratureRule & rule(const GeometryType &t, int p, QuadratureType::Enum qt=QuadratureType::GaussLegendre)
select the appropriate QuadratureRule for GeometryType t and order p
Definition quadraturerules.hh:326

## Member Typedef Documentation

## CoordType

template<typename ct, int dim>

typedef ct Dune::QuadratureRule< ct, dim >::CoordType

The type used for coordinates.

## iterator

template<typename ct, int dim>

typedef std::vector<QuadraturePoint<ct,dim>>::const_iterator Dune::QuadratureRule< ct, dim >::iterator

this container is always a const container, therefore iterator is the same as const_iterator

## Constructor & Destructor Documentation

## QuadratureRule() [1/3]

template<typename ct, int dim>

Dune::QuadratureRule< ct, dim >::QuadratureRule | ( |  | ) |

inline

Default constructor.

Create an invalid empty quadrature rule. This must be initialized later by copying another quadraturerule before it can be used.

## QuadratureRule() [2/3]

template<typename ct, int dim>

Dune::QuadratureRule< ct, dim >::QuadratureRule | ( | GeometryType | t | ) |

inline protected

Constructor for a given geometry type. Leaves the quadrature order invalid.

## QuadratureRule() [3/3]

template<typename ct, int dim>

Dune::QuadratureRule< ct, dim >::QuadratureRule | ( | GeometryType | t,
|  | int | order )

inline protected

Constructor for a given geometry type and a given quadrature order.

## ~QuadratureRule()

template<typename ct, int dim>

virtual Dune::QuadratureRule< ct, dim >::~QuadratureRule | ( |  | ) |

inline virtual

## Member Function Documentation

## order()

template<typename ct, int dim>

virtual int Dune::QuadratureRule< ct, dim >::order | ( |  | ) | const

inline virtual

return order

## type()

template<typename ct, int dim>

virtual GeometryType Dune::QuadratureRule< ct, dim >::type | ( |  | ) | const

inline virtual

return type of element

## Member Data Documentation

## d

template<typename ct, int dim>

int Dune::QuadratureRule< ct, dim >::d = dim

static constexpr

The space dimension.

## delivered_order

template<typename ct, int dim>

int Dune::QuadratureRule< ct, dim >::delivered_order

protected

## elements

T std::vector< T >::elements

inherited

STL member.

## geometry_type

template<typename ct, int dim>

GeometryType Dune::QuadratureRule< ct, dim >::geometry_type

protected

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

- quadraturerules.hh