Class template Dune::XT::Functions::CombinedFunction

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

template<class LeftType, class RightType, class comb>
class Dune::XT::Functions::CombinedFunction : public FunctionInterface<LeftType::d, internal::CombinedHelper<LeftType, RightType, comb>::r, internal::CombinedHelper<LeftType, RightType, comb>::rC, typename internal::CombinedHelper<LeftType, RightType, comb>::R>

Combined function.

using ConstantType = Functions::ConstantFunction< …, double>; ConstantType one( … ); ConstantType two( … ); // the following code auto difference = one - two; // is equivalent to Difference< ConstantType, ConstantType > difference(one, two); // and internal::Combined< ConstantType, ConstantType, CombinationType::difference > difference(one, tow);

using ConstantType = Functions::ConstantFunction< …, double >; Difference< ConstantType, ConstantType > stupid_difference() { ConstantType one( … ); ConstantType two( … ); return one - two; }

using ConstantType = Functions::ConstantFunction< …, double >; Difference< ConstantType, ConstantType > stupid_difference() { auto one = std::make_shared< ConstantType >(1); auto two = std::make_shared< ConstantType >(2); return Difference< ConstantType, ConstantType >(one, two) }

This class combines two given functions of type LeftType and RightType using the given combination Combination. This class (and any derived class, like Difference, Sum or Product) can be used in two ways: - You can pass references of the left and right operand to this class. This is done for instance when calling operator+, operator- or operator* on any function deriving from FunctionInterface:

In this situation you are responsible to ensure that the arguments given are valid throughout the lifetime of this class. The following will lead to a segfault:

  • You can pass shared_ptr of the left and right operands to this class. In this case the following is valid:

Note

Most likely you do not want to use this class diretly, but one of Difference, Sum or Product.

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

No documentation provided.

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

No documentation provided.

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

No documentation provided.

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

No documentation provided.

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

No documentation provided.

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

No documentation provided.

template<>
Dune::XT::Functions::CombinedFunction::CombinedFunction<LeftType, RightType, comb>(const LeftType &left, const RightType &right, const std::string &nm = <recovery-expr>(""))

No documentation provided.

template<>
Dune::XT::Functions::CombinedFunction::CombinedFunction<LeftType, RightType, comb>(const ThisType &other)

No documentation provided.

template<>
Dune::XT::Functions::CombinedFunction::CombinedFunction<LeftType, RightType, comb>(ThisType &&source) noexcept = default

No documentation provided.

int Dune::XT::Functions::CombinedFunction::left_

No documentation provided.

int Dune::XT::Functions::CombinedFunction::right_

No documentation provided.

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

No documentation provided.

type Dune::XT::Functions::CombinedFunction::BaseType

No documentation provided.

type Dune::XT::Functions::CombinedFunction::ThisType

No documentation provided.

type Dune::XT::Functions::CombinedFunction::Helper

No documentation provided.