Defines GridFunctions to be used in operators, boundary-conditions, interpolation and integration. More...
Classes | |
| class | AnalyticGridFunction< Function, GridView > |
| A Gridfunction that evaluates a function with global coordinates. More... | |
| class | ComposerGridFunction< Sig, EntitySet, Functor, GridFunctions > |
| A Gridfunction that applies a functor to the evaluated Gridfunctions. More... | |
| class | ConstantGridFunction< T, GridView > |
| Gridfunction returning a constant value. More... | |
| class | DerivativeGridFunction< GridFunction, Type > |
| A Gridfunction that returns the derivative when calling localFunction. More... | |
| class | DiscreteFunction< Coeff, GB, TreePath, R > |
| A mutable view on the subspace of a DOFVector,. More... | |
| class | ElementGridFunction< GridView, Container > |
| Gridfunction returning a constant value per element. More... | |
Functions | |
| template<class Expr > | |
| auto | gradientOf (Expr const &expr) |
| template<class PreGridFct , class GridView > | |
| decltype(auto) | makeGridFunction (PreGridFct const &preGridFct, GridView const &gridView) |
| Generator for Gridfunctions from Expressions (PreGridfunctions) More... | |
| template<class T , REQUIRES(Concepts::AnyGridFunction< T >) > | |
| auto | abs (T &&value) |
| template<class Functor , class... PreGridFcts> | |
| auto | invokeAtQP (Functor const &f, PreGridFcts &&... gridFcts) |
| Generator function for ComposerGridFunction. More... | |
| template<class Lhs , REQUIRES(Concepts::AnyGridFunction< Lhs >) > | |
| auto | operator- (Lhs &&lhs) |
| Applies Operation::Negate to GridFunctions. | |
| template<class Lhs , class Rhs , REQUIRES(Concepts::AnyGridFunction< Lhs, Rhs >) > | |
| auto | operator+ (Lhs &&lhs, Rhs &&rhs) |
| Applies Operation::Plus to GridFunctions. | |
| template<class Lhs , class Rhs , REQUIRES(Concepts::AnyGridFunction< Lhs, Rhs >) > | |
| auto | operator- (Lhs &&lhs, Rhs &&rhs) |
| Applies Operation::Minus to GridFunctions. | |
| template<class Lhs , class Rhs , REQUIRES(Concepts::AnyGridFunction< Lhs, Rhs >) > | |
| auto | operator* (Lhs &&lhs, Rhs &&rhs) |
| Applies Operation::Multiplies to GridFunctions. | |
| template<class Lhs , class Rhs , REQUIRES(Concepts::AnyGridFunction< Lhs, Rhs >) > | |
| auto | operator/ (Lhs &&lhs, Rhs &&rhs) |
| Applies Operation::Divides to GridFunctions. | |
| template<class Lhs , class Rhs , REQUIRES(Concepts::AnyGridFunction< Lhs, Rhs >) > | |
| auto | max (Lhs &&lhs, Rhs &&rhs) |
| Applies Operation::Max to GridFunctions. | |
| template<class Lhs , class Rhs , REQUIRES(Concepts::AnyGridFunction< Lhs, Rhs >) > | |
| auto | min (Lhs &&lhs, Rhs &&rhs) |
| Applies Operation::Min to GridFunctions. | |
| template<class Lhs , class Rhs , REQUIRES(Concepts::AnyGridFunction< Lhs, Rhs >) > | |
| auto | abs_max (Lhs &&lhs, Rhs &&rhs) |
| Applies Operation::AbsMax to GridFunctions. | |
| template<class Lhs , class Rhs , REQUIRES(Concepts::AnyGridFunction< Lhs, Rhs >) > | |
| auto | abs_min (Lhs &&lhs, Rhs &&rhs) |
| Applies Operation::AbsMin to GridFunctions. | |
| template<class V , class T , REQUIRES(Concepts::AnyGridFunction< V >) > | |
| auto | clamp (V &&v, T const &lo, T const &hi) |
| Applies Operation::Clamp to GridFunction. | |
| template<class T , REQUIRES(Concepts::AnyGridFunction< T >) > | |
| auto | tanh (T &&value) |
| Applies Operation::Tanh to GridFunctions. | |
| template<class T , REQUIRES(Concepts::AnyGridFunction< T >) > | |
| auto | signum (T &&value) |
| Applies Operation::Signum to GridFunctions. | |
| template<class T , REQUIRES(Concepts::AnyGridFunction< T >) > | |
| auto | sqr (T &&value) |
| Applies Operation::Sqr to GridFunction. | |
| template<int p, class T , REQUIRES(Concepts::AnyGridFunction< T >) > | |
| auto | pow (T &&value) |
| Applies Operation::Pow. More... | |
| template<class T , REQUIRES(Concepts::AnyGridFunction< T >) > | |
| auto | pow (T &&value, double p) |
| Applies Operation::Power to GridFunction. | |
| template<std::size_t I, class T , REQUIRES(Concepts::AnyGridFunction< T >) > | |
| auto | get (T &&value) |
| Applies Operation::Get<I> to GridFunction. | |
| template<class T , REQUIRES(Concepts::AnyGridFunction< T >) > | |
| auto | get (T &&value, std::size_t i) |
| Applies Operation::Get_ to GridFunction. | |
| template<class T > | |
| auto | constant (T const &value) |
| Return a reference-wrapper as GridFunction. | |
| template<class T > | |
| auto | reference (T &value) |
| Return a reference-wrapper as GridFunction. | |
| template<class Vec , REQUIRES(Concepts::AnyGridFunction< Vec >) > | |
| auto | sum (Vec &&vec) |
| Applies a sum() functor to a vector-valued GridFunction. | |
| template<class Vec , REQUIRES(Concepts::AnyGridFunction< Vec >) > | |
| auto | unary_dot (Vec &&vec) |
| Applies Operation::UnaryDot to a vector-valued GridFunction. | |
| template<class Vec , REQUIRES(Concepts::AnyGridFunction< Vec >) > | |
| auto | one_norm (Vec &&vec) |
| Applies a one_norm() functor to a vector-valued GridFunction. | |
| template<class Vec , REQUIRES(Concepts::AnyGridFunction< Vec >) > | |
| auto | two_norm (Vec &&vec) |
| Applies Operation::TwoNorm to a vector-valued GridFunction. | |
| template<int p, class Vec , REQUIRES(Concepts::AnyGridFunction< Vec >) > | |
| auto | p_norm (Vec &&vec) |
| Applies a p_norm() functor to a vector-valued GridFunction. | |
| template<class Vec , REQUIRES(Concepts::AnyGridFunction< Vec >) > | |
| auto | infty_norm (Vec &&vec) |
| Applies a infty_norm() functor to a vector-valued GridFunction. | |
| template<class Mat , REQUIRES(Concepts::AnyGridFunction< Mat >) > | |
| auto | trans (Mat &&mat) |
| Applies Operation::Trans to a matrix-valued GridFunction. | |
| template<class Lhs , class Rhs , REQUIRES(Concepts::AnyGridFunction< Lhs, Rhs >) > | |
| auto | dot (Lhs &&lhs, Rhs &&rhs) |
| Applies Operation::Dot to two vector-valued GridFunctions. | |
| template<class Lhs , class Rhs , REQUIRES(Concepts::AnyGridFunction< Lhs, Rhs >) > | |
| auto | distance (Lhs &&lhs, Rhs &&rhs) |
| Applies a distance-functor to two vector-valued GridFunctions. | |
| template<class Lhs , class Rhs , REQUIRES(Concepts::AnyGridFunction< Lhs, Rhs >) > | |
| auto | outer (Lhs &&lhs, Rhs &&rhs) |
| Applies an outer() functor to two vector-valued GridFunctions. | |
| template<class Lhs , class Rhs , REQUIRES(Concepts::AnyGridFunction< Lhs, Rhs >) > | |
| auto | cross (Lhs &&lhs, Rhs &&rhs) |
| Applies a cross() functor to two vector-valued GridFunctions. | |
Defines GridFunctions to be used in operators, boundary-conditions, interpolation and integration.
GridFunctions are expressions build up of some elementary terms and can be used to construct a GridFunctionOperator, can be interpolated to a DOFVector, and can be integrated over a GridView.
Thus, GridFunctions are an important incredient to formulate the bilinear and linear forms und to postprocess the solutions.
Examples:
Remarks:
Expression is anything, a GridFunction can be created from, sometimes also called PreGridFunction. It includes constants, functors callable with GlobalCoordinates, and any combination of GridFunctions.Anything that needs a quadrature formula, e.g., makeOperator() and integrate(), needs to determine the (approximative) polynomial degree of the GridFunctions. If the Gridfunction builds a polynomial expression, it can be deduced automatically, i.e. if it includes constants, DOFVectors, and arithmetic operator operator+, operator-, or operator*.
If the polynomial order can not be deduced, the compiler gives an error. Then, these functions accept an additional argument, to provide either the polynomial degree of the expression, or a quadrature rule explicitly.
Examples:
auto op1 = makeOperator(B, 1.0 + pow<2>(prob.solution(_0)));auto op2 = makeOperator(B, sin(X(0)), 4);auto op3 = makeOperator(B, sin(X(0)), Dune::QuadratureRules(Dune::GeometryType::simplex, 4));auto value1 = integrate(sin(X(0)), 4); | auto gradientOf | ( | Expr const & | expr | ) |
Generates a Gridfunction representing the gradient of a GridFunction. See DerivativeGridFunction.
Examples:
gradientOf(prob.solution(_0))gradientOf(X(0) + X(1) + prob.solution(_0)) Referenced by NewtonIteration< ProblemType >::oneIteration().
|
related |
Generator function for ComposerGridFunction.
Applies the functor f to the grid-functions gridFcts.... See ComposerGridFunction.
Examples:
invokeAtQP([](Dune::FieldVector<double, 2> const& x) { return two_norm(x); }, X());invokeAtQP([](double u, auto const& x) { return u + x[0]; }, 1.0, X());invokeAtQP(Operation::Plus{}, X(0), X(1)); References AMDiS::Concepts::Functor.
| decltype(auto) makeGridFunction | ( | PreGridFct const & | preGridFct, |
| GridView const & | gridView | ||
| ) |
Generator for Gridfunctions from Expressions (PreGridfunctions)
Create an evaluable GridFunction from an expression that itself can not be evaluated. Therefore, it binds the GridFunction to a GridView.
Example:
In contrast to Expressions, GridFunctions can be evaluated and
Referenced by ProblemStat< Traits >::addDirichletBC(), and DiscreteFunction< Coeff, GB, TreePath, R >::interpolate_noalias().
|
related |
Applies Operation::Pow.
to GridFunction.