DUNE PDELab (git)
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. More... | |
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 More... | |
Friends | |
constexpr friend auto | derivative (const MonomialSet &m) |
Construct the Derivative object from a MonomialSet. | |
Detailed Description
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()
|
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()()
|
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.
The documentation for this struct was generated from the following file:
- dune/functions/analyticfunctions/monomialset.hh