Dune-Fufem 2.11-git
Loading...
Searching...
No Matches

Adaptor for making a callback compatible with Dune::Fufem::Forms. More...

#include <dune/fufem/forms/userfunctions.hh>

Public Member Functions

 RangeOperator (const OuterOp &outerOp)
 
template<class Op , class... Args, std::enable_if_t< isOperatorOrSumOperator_v< Op >, int > = 0>
auto operator() (Op &&baseOperator, Args... args) const
 
template<class Op , std::enable_if_t< isOperatorOrSumOperator_v< Op >, int > = 0>
auto operator() (Op &&baseOperator) const
 
template<class Arg0 , class... Args, std::enable_if_t< not isOperatorOrSumOperator_v< Arg0 >, int > = 0>
auto operator() (Arg0 &&arg0, Args &&... args) const
 

Detailed Description

template<class OuterOp>
class Dune::Fufem::Forms::RangeOperator< OuterOp >

Adaptor for making a callback compatible with Dune::Fufem::Forms.

Template Parameters
OuterOpPointwise outer operator

When wrapping a simple callback f in a rf = RangeOperator(f), the latter can be used flexibiliy in two ways: For simple argumemts x calling rf(x) yields the same result as f(x). If the argument is a MultilinearOperator or SumOperator, then calling rf(x) yields a corresponding operator obtained by applying f pointwise on x. While the latter can also be achieved using compose(f,x), using a RangeOperator gives the freedom to apply the same function regardless of the argument type. It is also supported to pass additional arguments. The latter will be forwarded to f and captured by value in the operator case.

Constructor & Destructor Documentation

◆ RangeOperator()

template<class OuterOp >
Dune::Fufem::Forms::RangeOperator< OuterOp >::RangeOperator ( const OuterOp &  outerOp)
inline

Member Function Documentation

◆ operator()() [1/3]

template<class OuterOp >
template<class Arg0 , class... Args, std::enable_if_t< not isOperatorOrSumOperator_v< Arg0 >, int > = 0>
auto Dune::Fufem::Forms::RangeOperator< OuterOp >::operator() ( Arg0 &&  arg0,
Args &&...  args 
) const
inline

◆ operator()() [2/3]

template<class OuterOp >
template<class Op , std::enable_if_t< isOperatorOrSumOperator_v< Op >, int > = 0>
auto Dune::Fufem::Forms::RangeOperator< OuterOp >::operator() ( Op &&  baseOperator) const
inline

◆ operator()() [3/3]

template<class OuterOp >
template<class Op , class... Args, std::enable_if_t< isOperatorOrSumOperator_v< Op >, int > = 0>
auto Dune::Fufem::Forms::RangeOperator< OuterOp >::operator() ( Op &&  baseOperator,
Args...  args 
) const
inline

The documentation for this class was generated from the following file: