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

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 Vector & | position () 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.

## Static Public Attributes

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

## Protected Attributes

FieldVector< ct, dim > | local
ct | weight_

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

  ct | Number type used for both coordinates and the weights
  dim | Dimension of the integration domain

## Member Typedef Documentation

## Field

template<typename ct, int dim>

typedef ct Dune::QuadraturePoint< ct, dim >::Field

Number type used for coordinates and quadrature weights.

## Vector

template<typename ct, int dim>

typedef Dune::FieldVector<ct,dim> Dune::QuadraturePoint< ct, dim >::Vector

Type used for the position of a quadrature point.

## Constructor & Destructor Documentation

## QuadraturePoint()

template<typename ct, int dim>

Dune::QuadraturePoint< ct, dim >::QuadraturePoint | ( | const Vector & | x,
|  | ct | w )

inline

set up quadrature of given order in d dimensions

## 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;
Dune::QuadraturePoint::position
const Vector & position() const
return local coordinates of integration point i
Definition quadraturerules.hh:82
Dune::QuadraturePoint::weight
const ct & weight() const
return weight associated with integration point i
Definition quadraturerules.hh:88
Dune::QuadraturePoint::QuadraturePoint
QuadraturePoint(const Vector &x, ct w)
set up quadrature of given order in d dimensions
Definition quadraturerules.hh:78

is equivalent to

QuadraturePoint<double,2> quad_point = ...;
auto position = quad_point.position();
auto weight = quad_point.weight();

Template Parameters

  index | Positional argument of the quadrature point contents

Returns
  Position (index==0) or weight (index==1).

## position()

template<typename ct, int dim>

const Vector & Dune::QuadraturePoint< ct, dim >::position | ( |  | ) | const

inline

return local coordinates of integration point i

## weight()

template<typename ct, int dim>

const ct & Dune::QuadraturePoint< ct, dim >::weight | ( |  | ) | const

inline

return weight associated with integration point i

## Member Data Documentation

## dimension

template<typename ct, int dim>

int Dune::QuadraturePoint< ct, dim >::dimension = dim

static constexpr

Dimension of the integration domain.

## local

template<typename ct, int dim>

FieldVector<ct, dim> Dune::QuadraturePoint< ct, dim >::local

protected

## weight_

template<typename ct, int dim>

ct Dune::QuadraturePoint< ct, dim >::weight_

protected

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

- quadraturerules.hh