Dune-Functions 2.11
Loading...
Searching...
No Matches
Dune::Functions::MonomialSet< RangeFieldType, dimension, maxDegree > Struct Template Reference

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, sizeoperator() (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 >, sizeexponents ()
 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
RangeFieldTypescalar type.
dimDomain dimension.
maxDegreeMaximal 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 ( )
staticconstexpr

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
DomainFieldTypeThe scalar type of the domain.

◆ 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
staticconstexpr

◆ size

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

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