1 #ifndef DUNE_FEM_PASS_LOCAL_HH 2 #define DUNE_FEM_PASS_LOCAL_HH 18 template <
class DiscreteModelImp,
class PreviousPassImp ,
int passIdImp >
31 template<
class DiscreteModelImp,
class PreviousPassImp ,
int passIdImp >
33 :
public Pass< DiscreteModelImp , PreviousPassImp , passIdImp>
52 typedef typename DiscreteFunctionSpaceType::IteratorType
IteratorType;
54 typedef typename DiscreteFunctionSpaceType::EntityType
EntityType;
66 const DiscreteFunctionSpaceType &spc,
67 std::string passName =
"LocalPass")
84 std::ostringstream funcName;
94 const DiscreteFunctionSpaceType &
space ()
const {
return spc_; }
121 virtual void prepare (
const ArgumentType &arg, DestinationType &dest)
const = 0;
124 virtual void finalize (
const ArgumentType &arg, DestinationType &dest)
const = 0;
127 virtual void applyLocal (
const EntityType &en )
const = 0;
133 void compute (
const ArgumentType &arg, DestinationType &dest)
const 144 const IteratorType endit =
spc_.end();
157 const DiscreteFunctionSpaceType &
spc_;
168 #endif // #ifndef DUNE_FEM_PASS_LOCAL_HH virtual void prepare(const ArgumentType &arg, DestinationType &dest) const =0
DeleteHandlerType * deleteHandler_
object to delete destination_
Definition: common/pass.hh:380
DiscreteFunctionSpaceType::IteratorType IteratorType
iterator over the space
Definition: local.hh:52
const DiscreteFunctionSpaceType & spc_
Definition: local.hh:157
size_t numberOfElements_
Definition: local.hh:160
virtual double computeTime() const
return accumulated time needed by pass's operator () this method also resets the compute time to zero...
Definition: local.hh:99
DiscreteModelImp::Traits::DiscreteFunctionSpaceType DiscreteFunctionSpaceType
the discrete function space belonging to destinationtype
Definition: local.hh:50
bool active() const
return true if pass is active
Definition: local.hh:110
void disable() const
set pass status to inactive
Definition: local.hh:116
DiscreteModelImp::Traits::DestinationType DestinationType
the discrete function representing the return value of this pass
Definition: local.hh:48
virtual void allocateLocalMemory()
build up local memory
Definition: local.hh:80
static DeleteHandler< ObjectToDelete > & instance()
return reference to default object deleter
Definition: common/pass.hh:142
virtual void applyLocal(const EntityType &en) const =0
const std::string passName_
Definition: local.hh:158
EntityType Entity
Definition: local.hh:57
virtual ~LocalPass()
destructor
Definition: local.hh:77
PreviousPassImp PreviousPassType
type of the preceding pass
Definition: local.hh:37
int passNumber() const
Definition: common/pass.hh:183
void pass(const GlobalArgumentType &arg) const
Definition: common/pass.hh:267
DiscreteFunctionSpaceType::EntityType EntityType
the codim 0 entity
Definition: local.hh:54
Definition: coordinate.hh:4
BaseType::TotalArgumentType ArgumentType
The type of the argument (and destination) type of the overall operator.
Definition: local.hh:45
virtual void finalize(const ArgumentType &arg, DestinationType &dest) const =0
const DiscreteFunctionSpaceType & space() const
return reference to space
Definition: local.hh:94
void compute(const ArgumentType &arg, DestinationType &dest) const
Definition: local.hh:133
LocalPass(PreviousPassImp &pass, const DiscreteFunctionSpaceType &spc, std::string passName="LocalPass")
constructor
Definition: local.hh:65
Base class for specific pass implementations.
Definition: local.hh:19
double computeTime_
Definition: local.hh:159
void enable() const
set pass status to active
Definition: local.hh:113
Pass< DiscreteModelImp, PreviousPassImp, passIdImp > BaseType
base class
Definition: local.hh:40
PushFrontTuple< LocalArgumentType, const GlobalArgumentType * >::type TotalArgumentType
Definition: common/pass.hh:177
virtual size_t numberOfElements() const
return number of elements visited during operator computation
Definition: local.hh:107
Specialisation of Pass which provides a grid walk-through, but leaves open what needs to be done on e...
Definition: local.hh:32
bool passIsActive_
Definition: local.hh:161
DestinationType * destination_
destination (might be set from outside)
Definition: common/pass.hh:377