Dune Core Modules (unstable)

Dune::QuadraturePoint< ct, dim > Class Template Reference

Single evaluation point in a quadrature rule. More...

#include <dune/geometry/quadraturerules.hh>

Public Types

typedef ct Field
 Number type used for coordinates and quadrature weights.
 
typedef Dune::FieldVector< ct, dim > Vector
 Type used for the position of a quadrature point.
 

Public Member Functions

 QuadraturePoint (const Vector &x, ct w)
 set up quadrature of given order in d dimensions
 
const Vectorposition () const
 return local coordinates of integration point i
 
const ct & weight () const
 return weight associated with integration point i
 
template<std::size_t index, std::enable_if_t<(index<=1), int > = 0>
std::tuple_element_t< index, QuadraturePoint< ct, dim > > get () const
 Tuple like accessor for contents of a quadrature point. More...
 

Static Public Attributes

static constexpr int dimension = dim
 Dimension of the integration domain.
 

Detailed Description

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

Single evaluation point in a quadrature rule.

A quadrature point is a single (position, weight) pair used to evaluate a function at a position with a relative weight.

Template Parameters
ctNumber type used for both coordinates and the weights
dimDimension of the integration domain

Member Function Documentation

◆ get()

template<typename ct , int dim>
template<std::size_t index, std::enable_if_t<(index<=1), int > = 0>
std::tuple_element_t< index, QuadraturePoint< ct, dim > > Dune::QuadraturePoint< ct, dim >::get ( ) const
inline

Tuple like accessor for contents of a quadrature point.

This function is used by the compiler to generate structured binding for the (position, weight) pair. Thus, the snippet

QuadraturePoint<double,2> quad_point = ...;
auto [position, weight] = quad_point;
Single evaluation point in a quadrature rule.
Definition: quadraturerules.hh:66
const Vector & position() const
return local coordinates of integration point i
Definition: quadraturerules.hh:82
const ct & weight() const
return weight associated with integration point i
Definition: quadraturerules.hh:88

is equivalent to

QuadraturePoint<double,2> quad_point = ...;
auto position = quad_point.position();
auto weight = quad_point.weight();
Template Parameters
indexPositional argument of the quadrature point contents
Returns
Position (index==0) or weight (index==1).

The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)