1#ifndef DUNE_FEM_OPERATOR_COMMON_TUPLE_HH
2#define DUNE_FEM_OPERATOR_COMMON_TUPLE_HH
18 template<
class ... Operators >
22 namespace __TupleOperatorImp
28 template<
class ... Operators >
31 static_assert(
Std::are_all_same<
typename Operators::DomainFunctionType ... >::value,
32 "TupleOperator< ColTraits > needs a common DomainFunction Type." );
33 typedef typename std::tuple_element< 0, std::tuple< Operators ... > >::type::DomainFunctionType
DomainFunctionType;
40 template<
class ... Operators >
44 static_assert(
Std::are_all_same<
typename Operators::RangeFunctionType ... >::value,
45 "TupleOperator< RowTraits > needs a common RangeFunction Type." );
46 typedef typename std::tuple_element< 0, std::tuple< Operators ... > >::type::RangeFunctionType
RangeFunctionType;
55 template<
class ... Operators >
57 :
public Operator< typename __TupleOperatorImp::RowTraits< Operators ... >::DomainFunctionType,
58 typename __TupleOperatorImp::RowTraits< Operators ... >::RangeFunctionType >,
59 public std::tuple< Operators ... >
65 typedef std::tuple< Operators ... > TupleType;
71 template<
class ... Args >
73 : TupleType(
std::forward< Args >( args ) ... )
80 apply( arg, dest, tmp, std::integral_constant< std::size_t, 0 >() );
84 template< std::
size_t I >
88 std::get< I >( *
this )( std::get< I >( arg ), tmp );
90 apply( arg, dest, tmp, std::integral_constant< std::size_t, I + 1 >() );
94 RangeFunctionType &tmp, std::integral_constant< std::size_t,
sizeof ... (Operators ) > )
const
103 template<
class ... Operators >
105 :
public Operator< typename __TupleOperatorImp::ColTraits< Operators ... >::DomainFunctionType,
106 typename __TupleOperatorImp::ColTraits< Operators ... >::RangeFunctionType >,
107 public std::tuple< Operators ... >
113 typedef std::tuple< Operators ... > TupleType;
119 template<
class ... Args >
121 : TupleType(
std::forward< Args >( args ) ... )
127 apply( arg, dest, std::integral_constant< std::size_t, 0 >() );
131 template< std::
size_t I >
134 std::get< I >( *
this )( arg, std::get< I >( dest ) );
135 apply( arg, dest, std::integral_constant< std::size_t, I + 1 >() );
Definition: bindguard.hh:11
Definition: utility.hh:147
forward declaration
Definition: tuplediscretefunction/discretefunction.hh:51
abstract operator
Definition: operator.hh:34
DomainFunction DomainFunctionType
type of discrete function in the operator's domain
Definition: operator.hh:36
RangeFunction RangeFunctionType
type of discrete function in the operator's range
Definition: operator.hh:38
Definition: operator/common/tuple.hh:60
BaseType::DomainFunctionType DomainFunctionType
Definition: operator/common/tuple.hh:68
void apply(const DomainFunctionType &arg, RangeFunctionType &dest, RangeFunctionType &tmp, std::integral_constant< std::size_t, sizeof ...(Operators) >) const
Definition: operator/common/tuple.hh:93
void operator()(const DomainFunctionType &arg, RangeFunctionType &dest) const
Definition: operator/common/tuple.hh:76
BaseType::RangeFunctionType RangeFunctionType
Definition: operator/common/tuple.hh:69
void apply(const DomainFunctionType &arg, RangeFunctionType &dest, RangeFunctionType &tmp, std::integral_constant< std::size_t, I >) const
Definition: operator/common/tuple.hh:85
TupleOperator(Args &&... args)
Definition: operator/common/tuple.hh:72
Definition: operator/common/tuple.hh:30
std::tuple_element< 0, std::tuple< Operators... > >::type::DomainFunctionType DomainFunctionType
Definition: operator/common/tuple.hh:33
TupleDiscreteFunction< typename Operators::RangeFunctionType ... > RangeFunctionType
Definition: operator/common/tuple.hh:34
Definition: operator/common/tuple.hh:42
std::tuple_element< 0, std::tuple< Operators... > >::type::RangeFunctionType RangeFunctionType
Definition: operator/common/tuple.hh:46
TupleDiscreteFunction< typename Operators::DomainFunctionType ... > DomainFunctionType
Definition: operator/common/tuple.hh:43
Definition: operator/common/tuple.hh:108
BaseType::RangeFunctionType RangeFunctionType
Definition: operator/common/tuple.hh:117
void apply(const DomainFunctionType &arg, RangeFunctionType &dest, std::integral_constant< std::size_t, I >) const
Definition: operator/common/tuple.hh:132
void apply(const DomainFunctionType &arg, RangeFunctionType &dest, std::integral_constant< std::size_t, sizeof ...(Operators) >) const
Definition: operator/common/tuple.hh:138
void operator()(const DomainFunctionType &arg, RangeFunctionType &dest) const
Definition: operator/common/tuple.hh:124
BaseType::DomainFunctionType DomainFunctionType
Definition: operator/common/tuple.hh:116
RowTupleOperator(Args &&... args)
Definition: operator/common/tuple.hh:120