1#ifndef DUNE_FEM_SPACEOPERATORIF_HH
2#define DUNE_FEM_SPACEOPERATORIF_HH
34 template<
class DiscreteFunction,
35 class JacobianOperator = Fem::AutomaticDifferenceOperator< DiscreteFunction > >
37 :
public JacobianOperator
54 using BaseType::operator ();
60 virtual int size ()
const {
return space().size(); }
76 virtual void setTime (
const double time ) {}
88 return std::numeric_limits< double >::max();
127 mutable std::unique_ptr< DestinationType >
uTmp_;
131 template <
class OperatorType>
141 mutable OperatorType*
op_;
173 template <
class OperatorType>
187 typedef typename OperatorType::DestinationType DestinationType;
190 typedef typename DestinationType :: DiscreteFunctionSpaceType SpaceType;
211 virtual void operator () (
const DestinationType& arg, DestinationType& dest)
const
219 const SpaceType&
space()
const {
return pass().space(); }
230 pass().allocateLocalMemory();
231 return & (
pass().destination());
236 template <
class OperatorType>
253 typedef typename DestinationType :: DiscreteFunctionSpaceType
SpaceType;
276 template<
class DiscreteFunction,
class JacobianOperator >
277 inline void SpaceOperatorInterface< DiscreteFunction, JacobianOperator >
Definition: bindguard.hh:11
Definition: objpointer.hh:42
interface for time evolution operators
Definition: spaceoperatorif.hh:38
virtual ~SpaceOperatorInterface()
destructor
Definition: spaceoperatorif.hh:52
DestinationType::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
type of discrete function space
Definition: spaceoperatorif.hh:47
virtual void applyLimiter(DestinationType &U) const
limiter application operator
Definition: spaceoperatorif.hh:110
virtual void setTime(const double time)
set time for operators
Definition: spaceoperatorif.hh:76
DiscreteFunctionSpaceType SpaceType
convenience typedef for space type
Definition: spaceoperatorif.hh:49
virtual void limit(const DestinationType &arg, DestinationType &dest) const
limiter application operator
Definition: spaceoperatorif.hh:97
virtual const DestinationType * destination() const
return reference to pass's local memory
Definition: spaceoperatorif.hh:124
virtual bool hasLimiter() const
return true if limit method is implemented
Definition: spaceoperatorif.hh:71
virtual int size() const
return size of discrete function space, i.e. number of unknowns
Definition: spaceoperatorif.hh:60
virtual const DiscreteFunctionSpaceType & space() const =0
return reference to space (needed by ode solvers)
virtual void initializeTimeStepSize(const DestinationType &U0) const
call operator once to calculate initial time step size
Definition: spaceoperatorif.hh:278
virtual double timeStepEstimate() const
estimate maximum time step
Definition: spaceoperatorif.hh:86
std::unique_ptr< DestinationType > uTmp_
Definition: spaceoperatorif.hh:127
DiscreteFunction DestinationType
type of argument and destination
Definition: spaceoperatorif.hh:44
only for keeping the pointer
Definition: spaceoperatorif.hh:134
OperatorType * op_
Definition: spaceoperatorif.hh:141
SpaceOperatorStorage(OperatorType *op)
constructor storing pointer
Definition: spaceoperatorif.hh:147
SpaceOperatorStorage(OperatorType *op, ObjPointerStorage *model)
constructor storing pointer
Definition: spaceoperatorif.hh:152
OperatorType & pass() const
return reference to pass
Definition: spaceoperatorif.hh:165
~SpaceOperatorStorage()
destructor deletes operator
Definition: spaceoperatorif.hh:157
ObjPointerStorage * model_
Definition: spaceoperatorif.hh:143
only for keeping the pointer
Definition: spaceoperatorif.hh:177
const DestinationType * destination() const
return reference to pass's local memory
Definition: spaceoperatorif.hh:228
virtual void operator()(const DestinationType &arg, DestinationType &dest) const
application operator does nothing here
Definition: spaceoperatorif.hh:211
SpaceOperatorPtr(OperatorType *op, ObjPointerStorage *model)
constructor storing pointer
Definition: spaceoperatorif.hh:203
SpaceOperatorPtr(OperatorType *op)
constructor storing pointer
Definition: spaceoperatorif.hh:198
virtual ~SpaceOperatorPtr()
destructor
Definition: spaceoperatorif.hh:208
const SpaceType & space() const
return reference to space
Definition: spaceoperatorif.hh:219
void setTime(const double time)
set time for operators
Definition: spaceoperatorif.hh:222
double timeStepEstimate() const
estimate maximum time step
Definition: spaceoperatorif.hh:225
apply wrapper
Definition: spaceoperatorif.hh:239
SpaceOperatorWrapper(OperatorType *op, ObjPointerStorage *model)
constructor storing pointer
Definition: spaceoperatorif.hh:261
DestinationType::DiscreteFunctionSpaceType SpaceType
type of discrete function space
Definition: spaceoperatorif.hh:253
OperatorType::DestinationType DestinationType
type of Argument and Destination
Definition: spaceoperatorif.hh:251
SpaceOperatorWrapper(OperatorType *op)
constructor storing pointer
Definition: spaceoperatorif.hh:256
void operator()(const DestinationType &arg, DestinationType &dest) const
call application operator of internal operator
Definition: spaceoperatorif.hh:266