Class template Dune::XT::Functions::GenericGridFunction

Inherits from Dune::XT::Functions::GridFunctionInterface.

template<class E, size_t r = 1, size_t rC = 1, class R = double>
class Dune::XT::Functions::GenericGridFunction : public GridFunctionInterface<E, r, rC, R>

A function given by a lambda expression or std::function which is evaluated locally on each element.

GenericGridFunction<…> f([](const typename F::DomainType& point_in_local_coordinates, const XT::Common::Parameter& param) { typename F::RangeType ret(std::pow(point_in_local_coordinates[0], param.get(“power”).at(0))); return ret; }, integration_order, XT::Common::ParameterType(“power”, 1), “x_power_p”);

To model the function f(x) = x^p (where x is the local coordinate on the reference element) with a variable exponent p, use as

The XT::Common::ParameterType provided on construction ensures that the XT::Common::Parameter param which is passed on to the generic function is of correct type. If you want the function to have Jacobians, you have to provide an additional generic function to the constructor. Note that this generic jacobian function should describe the local jacobian on the reference element (for the x^p function in one dimension, this would be p x^{p-1}). The jacobian(…) method of the LocalGenericGridFunction will do the transformation for you and return the jacobian on the actual grid element.

Class Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction

Inherits from Dune::XT::Functions::ElementFunctionInterface.

class Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction : public ElementFunctionInterface<E, r, rC, R>

No documentation provided.

void Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::post_bind(const ElementType &element) final

No documentation provided.

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

No documentation provided.

RangeReturnType Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::evaluate(const DomainType &point_in_local_coordinates, const Common::Parameter &param = <recovery-expr>({})) const final

No documentation provided.

DerivativeRangeReturnType Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::jacobian(const DomainType &point_in_local_coordinates, const Common::Parameter &param = <recovery-expr>({})) const final

No documentation provided.

DerivativeRangeReturnType Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::derivative(const std::array<size_t, d> &alpha, const DomainType &point_in_local_coordinates, const Common::Parameter &param = <recovery-expr>({})) const final

No documentation provided.

Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::LocalGenericGridFunction(GenericOrderFunctionType order_func, GenericPostBindFunctionType post_bind_func, GenericEvaluateFunctionType evaluate_func, const Common::ParameterType &param_type, GenericJacobianFunctionType jacobian_func, GenericDerivativeFunctionType derivative_func)

No documentation provided.

const GenericOrderFunctionType Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::order_

No documentation provided.

const GenericPostBindFunctionType Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::post_bind_

No documentation provided.

const GenericEvaluateFunctionType Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::evaluate_

No documentation provided.

const GenericJacobianFunctionType Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::jacobian_

No documentation provided.

const GenericDerivativeFunctionType Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::derivative_

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::BaseType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::GenericEvaluateFunctionType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::GenericPostBindFunctionType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::GenericOrderFunctionType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::GenericJacobianFunctionType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::LocalGenericGridFunction::GenericDerivativeFunctionType

No documentation provided.

ThisType *Dune::XT::Functions::GenericGridFunction::copy_as_grid_function_impl() const override

No documentation provided.

int Dune::XT::Functions::GenericGridFunction::copy_as_grid_function() const

No documentation provided.

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

No documentation provided.

int Dune::XT::Functions::GenericGridFunction::local_function() const final

No documentation provided.

static GenericOrderFunctionType Dune::XT::Functions::GenericGridFunction::default_order_lambda(const int ord)

\ }

´´These methods may be used to provide defaults on construction.‘’

\ {

static GenericPostBindFunctionType Dune::XT::Functions::GenericGridFunction::default_post_bind_function()

No documentation provided.

static GenericEvaluateFunctionType Dune::XT::Functions::GenericGridFunction::default_evaluate_function()

No documentation provided.

static GenericJacobianFunctionType Dune::XT::Functions::GenericGridFunction::default_jacobian_function()

No documentation provided.

static GenericDerivativeFunctionType Dune::XT::Functions::GenericGridFunction::default_derivative_function()

No documentation provided.

template<>
Dune::XT::Functions::GenericGridFunction::GenericGridFunction<E, r, rC, R>(const int ord, GenericPostBindFunctionType post_bind_func = default_post_bind_function(), GenericEvaluateFunctionType evaluate_func = default_evaluate_function(), const Common::ParameterType &param_type = Common::ParameterType(), std::string nm = <recovery-expr>("GenericGridFunction"), GenericJacobianFunctionType jacobian_func = default_jacobian_function(), GenericDerivativeFunctionType derivative_func = default_derivative_function())

No documentation provided.

template<>
Dune::XT::Functions::GenericGridFunction::GenericGridFunction<E, r, rC, R>(GenericOrderFunctionType order_func, GenericPostBindFunctionType post_bind_func = default_post_bind_function(), GenericEvaluateFunctionType evaluate_func = default_evaluate_function(), const Common::ParameterType &param_type = Common::ParameterType(), std::string nm = <recovery-expr>("GenericGridFunction"), GenericJacobianFunctionType jacobian_func = default_jacobian_function(), GenericDerivativeFunctionType derivative_func = default_derivative_function())

No documentation provided.

template<>
Dune::XT::Functions::GenericGridFunction::GenericGridFunction<E, r, rC, R>(const ThisType&) = default

No documentation provided.

template<>
Dune::XT::Functions::GenericGridFunction::GenericGridFunction<E, r, rC, R>(ThisType&&) noexcept = default

No documentation provided.

const GenericOrderFunctionType Dune::XT::Functions::GenericGridFunction::order_
const GenericPostBindFunctionType Dune::XT::Functions::GenericGridFunction::post_bind_

No documentation provided.

const GenericEvaluateFunctionType Dune::XT::Functions::GenericGridFunction::evaluate_

No documentation provided.

const std::string Dune::XT::Functions::GenericGridFunction::name_

No documentation provided.

const GenericJacobianFunctionType Dune::XT::Functions::GenericGridFunction::jacobian_

No documentation provided.

const GenericDerivativeFunctionType Dune::XT::Functions::GenericGridFunction::derivative_

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::ThisType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::BaseType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::DomainType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::RangeType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::DerivativeRangeType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::RangeReturnType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::DerivativeRangeReturnType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::GenericOrderFunctionType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::GenericPostBindFunctionType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::GenericEvaluateFunctionType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::GenericJacobianFunctionType

No documentation provided.

type Dune::XT::Functions::GenericGridFunction::GenericDerivativeFunctionType

No documentation provided.