1 #ifndef DUNE_FEM_PASS_INSERTOPERATOR_HH 2 #define DUNE_FEM_PASS_INSERTOPERATOR_HH 8 #include <dune/common/tupleutility.hh> 21 namespace __InsertOperatorPass
27 template<
class DomainFunction,
class RangeFunction >
30 std::false_type __isOperator ( ... );
32 template<
class Operator >
33 using isOperator = decltype( __isOperator( std::declval< Operator >() ) );
37 template<
class Operator >
48 #endif // #ifndef DOXYGEN 66 template<
class Operator,
class PreviousPass,
int id >
68 :
public Dune::Fem::Pass< __InsertOperatorPass::DiscreteModel< Operator >, PreviousPass, id >
72 static_assert( __InsertOperatorPass::isOperator< Operator >::value,
"Template parameter Operator is not derived from Dune::Fem::Operator" );
87 using BaseType::passNumber;
90 using BaseType::deleteHandler_;
91 using BaseType::destination_;
104 InsertOperatorPass (
const typename OperatorType::RangeFunctionType::DiscreteFunctionSpaceType &space,
105 const OperatorType &op, PreviousPassType &pass )
117 #endif // #ifndef DOXYGEN 128 destination_ =
new DestinationType(
"stabilization_pass_" + std::to_string( passNumber() ), space() );
129 deleteHandler_ = &(BaseType::DeleteHandlerType::instance());
135 DUNE_THROW( NotImplemented,
"Method printTexInfo() not implemented" );
139 void compute (
const TotalArgumentType &arg, DestinationType &dest )
const 151 const typename OperatorType::RangeFunctionType::DiscreteFunctionSpaceType &
space ()
const 159 void apply (
const TotalArgumentType &u, DestinationType &w )
const 162 typedef std::integral_constant< int, PreviousPassType::passId > Key;
163 const std::size_t position = Dune::FirstTypeIndex< typename PreviousPassType::PassIds, Key >::type::value;
171 const typename OperatorType::RangeFunctionType::DiscreteFunctionSpaceType &space_;
172 const OperatorType &operator_;
179 #endif // #ifndef DUNE_FEM_PASS_INSERTOPERATOR_HH RangeFunction RangeFunctionType
type of discrete function in the operator's range
Definition: operator.hh:30
const OperatorType::RangeFunctionType::DiscreteFunctionSpaceType & space() const
return discrete function space
Definition: insertoperator.hh:151
Operator OperatorType
export operator type
Definition: insertoperator.hh:72
void apply(const TotalArgumentType &u, DestinationType &w) const
Definition: insertoperator.hh:159
include a Dune::Fem::Operator into a pass
Definition: insertoperator.hh:67
InsertOperatorPass(const typename OperatorType::RangeFunctionType::DiscreteFunctionSpaceType &space, const OperatorType &op, PreviousPassType &pass)
constructor
Definition: insertoperator.hh:104
abstract operator
Definition: operator.hh:25
void compute(const TotalArgumentType &arg, DestinationType &dest) const
Definition: insertoperator.hh:139
PreviousPassImp PreviousPassType
Type of the preceding pass.
Definition: common/pass.hh:150
Definition: coordinate.hh:4
BaseType::TotalArgumentType TotalArgumentType
Definition: insertoperator.hh:82
BaseType::PreviousPassType PreviousPassType
Type of the preceding pass.
Definition: insertoperator.hh:79
void printTexInfo(std::ostream &) const
printTex info of operator
Definition: insertoperator.hh:133
Base class for specific pass implementations.
Definition: local.hh:19
DiscreteModelImp::Traits::DestinationType DestinationType
Definition: common/pass.hh:161
BaseType::DestinationType DestinationType
Definition: insertoperator.hh:84
PushFrontTuple< LocalArgumentType, const GlobalArgumentType * >::type TotalArgumentType
Definition: common/pass.hh:177
void allocateLocalMemory()
Definition: insertoperator.hh:124
DomainFunction DomainFunctionType
type of discrete function in the operator's domain
Definition: operator.hh:28