1#ifndef DUNE_FEM_ADAPTCALLBACKHANDLE_HH
2#define DUNE_FEM_ADAPTCALLBACKHANDLE_HH
4#include <dune/grid/common/gridenums.hh>
5#include <dune/grid/common/adaptcallback.hh>
22 template<
class Gr
id,
class DofManager,
class RestrictPro
longOperator >
24 :
public AdaptDataHandle
25 < Grid, RestrictProlongWrapper< Grid, DofManager, RestrictProlongOperator > >
28 typedef AdaptDataHandle< Grid, This > Base;
40 typedef typename Base::Entity
Entity;
65 assert( entity.partitionType() != GhostEntity );
74 void initialize (
unsigned int estimatedAdditionalElements = 0 )
126 typedef typename Entity::HierarchicIterator HIterator;
129 const int childLevel = father.level() + 1;
130 const HIterator end = father.hend( childLevel );
131 for( HIterator it = father.hbegin( childLevel ); it != end; ++it )
136 rpOp_.restrictFinalize( father );
154 typedef typename Entity::HierarchicIterator HIterator;
157 const int childLevel = father.level() + 1;
158 const HIterator end = father.hend( childLevel );
159 for( HIterator it = father.hbegin( childLevel ); it != end; ++it )
void restrictLocal(const EntityType &father, const EntityType &son, bool initialize) const
restrict data to father and resize memory if doResize is true
Definition: dofmanager.hh:685
void reserveMemory(int nsize, bool dummy=false)
reserve memory for at least nsize elements, dummy is needed for dune-grid ALUGrid version
Definition: dofmanager.hh:965
void prolongLocal(const EntityType &father, const EntityType &son, bool initialize) const
prolong data to children and resize memory if doResize is true
Definition: dofmanager.hh:705
NewIndexSetRestrictProlongType & indexSetRestrictProlong()
returns the index set restriction and prolongation operator
Definition: dofmanager.hh:923
void compress()
Compress all data that is hold by this dofmanager.
Definition: dofmanager.hh:1038
bool notifyGlobalChange(const bool wasChanged) const
communicate new sequence number
Definition: dofmanager.hh:1063
Definition: bindguard.hh:11
Definition: adaptcallbackhandle.hh:26
void preCoarsening(const Entity &father) const
Definition: adaptcallbackhandle.hh:122
void restrictLocal(const Entity &father, const Entity &son, bool initialize) const
Definition: adaptcallbackhandle.hh:140
void finalize()
finalize calls the compress on the DofManager
Definition: adaptcallbackhandle.hh:95
RestrictProlongOperator & rpOp_
Definition: adaptcallbackhandle.hh:32
DofManager & dofManager_
Definition: adaptcallbackhandle.hh:31
RestrictProlongWrapper(DofManager &dofManager, RestrictProlongOperator &rpOp)
Definition: adaptcallbackhandle.hh:42
void postRefinement(const Entity &father) const
Definition: adaptcallbackhandle.hh:150
void initialize(unsigned int estimatedAdditionalElements=0)
initialize basically reserves some memory on the DofManager
Definition: adaptcallbackhandle.hh:74
bool initializeCalled_
Definition: adaptcallbackhandle.hh:36
Base::Entity Entity
Definition: adaptcallbackhandle.hh:40
bool finalizeCalled_
Definition: adaptcallbackhandle.hh:37
void prolongLocal(const Entity &father, const Entity &son, bool initialize) const
Definition: adaptcallbackhandle.hh:167
void preAdapt(const unsigned int estimatedAdditionalElements)
Definition: adaptcallbackhandle.hh:70
bool isValidEntity(const Entity &entity) const
Definition: adaptcallbackhandle.hh:59
bool wasChanged_
Definition: adaptcallbackhandle.hh:35
RestrictProlongWrapper(const RestrictProlongWrapper &org)
Definition: adaptcallbackhandle.hh:51
void postAdapt()
Definition: adaptcallbackhandle.hh:71
Definition: dofmanager.hh:761