Class template Dune::XT::Functions::ExpressionFunction

Inherits from Dune::XT::Functions::FunctionInterface.

template<size_t d, size_t r = 1, size_t rC = 1, class RangeField = double>
class Dune::XT::Functions::ExpressionFunction : public FunctionInterface<d, r, rC, RangeField>

Note

This is the matrix valued version, see below for scalar- and vectorvalued case.

Note

We have a specialization for the other case on purpose, disabling all ctors and using helpers got too complicated!

static std::string Dune::XT::Functions::ExpressionFunction::static_id()

No documentation provided.

static Common::Configuration Dune::XT::Functions::ExpressionFunction::defaults()

No documentation provided.

static Common::FieldVector<std::string, r * rC> Dune::XT::Functions::ExpressionFunction::matrix_to_vector(const Common::FieldMatrix<std::string, r, rC> &mat)

No documentation provided.

ThisType *Dune::XT::Functions::ExpressionFunction::copy_as_function_impl() const override

No documentation provided.

int Dune::XT::Functions::ExpressionFunction::copy_as_function() const

No documentation provided.

std::string Dune::XT::Functions::ExpressionFunction::name() const final

No documentation provided.

int Dune::XT::Functions::ExpressionFunction::order(const Common::Parameter& = <recovery-expr>({})) const final

No documentation provided.

RangeReturnType Dune::XT::Functions::ExpressionFunction::evaluate(const DomainType &point_in_global_coordinates, const Common::Parameter& = <recovery-expr>({})) const final

No documentation provided.

DerivativeRangeReturnType Dune::XT::Functions::ExpressionFunction::jacobian(const DomainType &point_in_global_coordinates, const Common::Parameter& = <recovery-expr>({})) const final

No documentation provided.

template<>
Dune::XT::Functions::ExpressionFunction::ExpressionFunction<d, r, rC, RangeField>(const std::string &variable, const Common::FieldMatrix<std::string, r, rC> &expressions, const Common::FieldVector<Common::FieldMatrix<std::string, rC, d>, r> &gradient_expressions, const size_t ord, std::string nm = static_id())

Creates an Expression function

For this example the correct constructor call is FunctionType function(“x”, , , }, 3);

:param variable: variable of the Expression function, e.g. “x” :param expressions: FieldMatrix with size r x rC for the range of the Expression function range, e.g. [1 sin(x[0]); 2 x[1]] with r = rC = 2 :param gradient_expressions: FieldVector , vector of the jacobian matrices, where the vector has the size of r and the inner Matrix the size rC x d, e.g. [[0 0 ; cos(x[0]) 0] , [0 0 ; 0 1]] would be the gradient_expression corresponding to the expression above (if d = r = rC = 2) Note: it is optional to provide a gradient if you do not want to use jacobian(). :param ord: order of the Expression function :param nm: name of the Expression function

template<>
Dune::XT::Functions::ExpressionFunction::ExpressionFunction<d, r, rC, RangeField>(const std::string &variable, const Common::FieldMatrix<std::string, r, rC> &expressions, const size_t ord, std::string nm = static_id())

ExpressionFunction without given gradient

template<>
Dune::XT::Functions::ExpressionFunction::ExpressionFunction<d, r, rC, RangeField>(const ThisType &other)

No documentation provided.

template<>
Dune::XT::Functions::ExpressionFunction::ExpressionFunction<d, r, rC, RangeField>(ThisType&&) noexcept = default

No documentation provided.

MathExpressionFunctionType Dune::XT::Functions::ExpressionFunction::function_

No documentation provided.

size_t Dune::XT::Functions::ExpressionFunction::order_

No documentation provided.

std::string Dune::XT::Functions::ExpressionFunction::name_

No documentation provided.

int Dune::XT::Functions::ExpressionFunction::gradients_

No documentation provided.

type Dune::XT::Functions::ExpressionFunction::BaseType

No documentation provided.

type Dune::XT::Functions::ExpressionFunction::ThisType

No documentation provided.

type Dune::XT::Functions::ExpressionFunction::MathExpressionFunctionType

No documentation provided.

type Dune::XT::Functions::ExpressionFunction::MathExpressionGradientType

No documentation provided.

type Dune::XT::Functions::ExpressionFunction::DerivativeRangeReturnType

No documentation provided.

type Dune::XT::Functions::ExpressionFunction::DomainType

No documentation provided.

type Dune::XT::Functions::ExpressionFunction::RangeFieldType

No documentation provided.

type Dune::XT::Functions::ExpressionFunction::SingleDerivativeRangeReturnType

No documentation provided.

template<class V>
void Dune::XT::Functions::ExpressionFunction::check_value(const DomainType &point_in_global_coordinates, const V &value) const

No documentation provided.