Loading...
Searching...
No Matches
Dune::Functions::MonomialSet< RangeFieldType, dimension, maxDegree > Struct Template Reference
Functions » Function implementations

Function, which evaluates all monomials up to degree `maxDegree` in a given coordinate. More...

`#include <dune/functions/analyticfunctions/monomialset.hh>`

## Classes

struct | Derivative
| Set of all first order derivatives of monomials up to degree `maxDegree` as vector of vector valued functions. More...

## Public Member Functions

template<class DomainFieldType>
constexpr Dune::FieldVector< RangeFieldType, size > | operator() (const Dune::FieldVector< DomainFieldType, dim > &x) const
| Return array of monomial evaluations.

## Static Public Member Functions

static constexpr std::array< std::array< std::size_t, dim >, size > | exponents ()
| Return array of monomial exponents with shape size x dim.

## Static Public Attributes

static constexpr int | dim = dimension
static constexpr int | size = Dune::binomial(maxDegree + dim, dim)

## Friends

constexpr friend auto | derivative (const MonomialSet &m)
| Construct the Derivative object from a MonomialSet.

## Detailed Description

template<class RangeFieldType, int dimension, int maxDegree>
struct Dune::Functions::MonomialSet< RangeFieldType, dimension, maxDegree >

Function, which evaluates all monomials up to degree `maxDegree` in a given coordinate.

Template Parameters

  RangeFieldType | scalar type.
  dim | Domain dimension.
  maxDegree | Maximal monomial degree.

The Range of this (differentiable) function is a vector of monomial evaluations [1,x,y,z,xx,xy,yy,xz,yz,zz,...] in the coordinate vector [x,y,z]. The maximal degree of the provided monomial evaluations is given by the parameter `maxDegree`. The number of coordinate components is given by the `dimension`. From `maxDegree` and `dimension` the total number of monomials can be computed as binomial(maxDegree+dimension, dimension) and is provided as static constant ::size in the class.

The function models the Concept::DifferentiableFunction<Range(Domain)> concept.

The MonomialSet function is specialized for `dim` = 1, `dim` = 2, and `dim` = 3 only.

## Member Function Documentation

## exponents()

template<class RangeFieldType, int dimension, int maxDegree>

constexpr std::array< std::array< std::size_t, dim >, size > Dune::Functions::MonomialSet< RangeFieldType, dimension, maxDegree >::exponents | ( |  | ) |

static constexpr

Return array of monomial exponents with shape size x dim.

The k-the entry of the returned array is the exponent multi-index of the monomial corresponding the the k-th component of the function. Note that the ordering is tensor based, e.g., for the set of 3d monomials 1,x,y,z,xx,xy,yy,xz,yz,zz, ... we get the exponents: [ [0,0,0], [1,0,0], [0,1,0], [0,0,1], [2,0,0], [1,1,0], [0,2,0], [1,0,1], [0,1,1], [0,0,2], ...]

## operator()()

template<class RangeFieldType, int dimension, int maxDegree>
template<class DomainFieldType>

Dune::FieldVector< RangeFieldType, size > Dune::Functions::MonomialSet< RangeFieldType, dimension, maxDegree >::operator() | ( | const Dune::FieldVector< DomainFieldType, dim > & | x | ) | const

constexpr

Return array of monomial evaluations.

The k-the entry of the returned array is the value of the monomial corresponding the the k-th entry of the return value of exponents().

Template Parameters

  DomainFieldType | The scalar type of the domain.

## Friends And Related Symbol Documentation

## derivative

template<class RangeFieldType, int dimension, int maxDegree>

friend auto derivative | ( | const MonomialSet< RangeFieldType, dimension, maxDegree > & | m | ) |

friend

Construct the Derivative object from a MonomialSet.

## Member Data Documentation

## dim

template<class RangeFieldType, int dimension, int maxDegree>

int Dune::Functions::MonomialSet< RangeFieldType, dimension, maxDegree >::dim = dimension

static constexpr

## size

template<class RangeFieldType, int dimension, int maxDegree>

int Dune::Functions::MonomialSet< RangeFieldType, dimension, maxDegree >::size = Dune::binomial(maxDegree + dim, dim)

static constexpr

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

- monomialset.hh