3 #ifndef DUNE_ADAPTCALLBACK_HH
4 #define DUNE_ADAPTCALLBACK_HH
18 template<
class Gr
id,
class Impl >
26 template<
class Gr
id,
class Impl >
34 typedef typename Grid::template Codim< 0 >::Entity
Entity;
41 This &operator= (
const This & );
44 void preAdapt (
const unsigned int estimateAdditionalElements )
46 asImp().preAdapt( estimateAdditionalElements );
56 asImp().preCoarsening( father );
61 asImp().postRefinement( father );
66 asImp().restrictLocal( father, son, initialize );
71 asImp().prolongLocal( father, son, initialize );
77 return static_cast< const Impl &
>( *this );
82 return static_cast< Impl &
>( *this );
91 template<
class Gr
id,
class Impl >
93 :
public AdaptDataHandleInterface< Grid, Impl >
96 typedef AdaptDataHandleInterface< Grid, Impl > Base;
107 This &operator= (
const This & );
109 void preAdapt (
const unsigned int estimateAdditionalElements );
111 void preCoarsening (
const Entity &father )
const;
112 void postRefinement (
const Entity &father )
const;
120 template <
class A,
class B >
132 template <
class EntityType>
133 void restrictLocal ( EntityType &father, EntityType &son,
bool initialize )
const
135 _a.restrictLocal(father,son,initialize);
136 _b.restrictLocal(father,son,initialize);
140 template <
class EntityType>
141 void prolongLocal ( EntityType &father, EntityType &son,
bool initialize )
const
143 _a.prolongLocal(father,son,initialize);
144 _b.prolongLocal(father,son,initialize);
Grid::template Codim< 0 >::Entity Entity
Definition: adaptcallback.hh:34
friend class AdaptDataHandle< Grid, Impl >
Definition: adaptcallback.hh:31
void prolongLocal(const Entity &father, const Entity &son, bool initialize) const
Definition: adaptcallback.hh:69
Wrapper class for entities.
Definition: common/entity.hh:56
void restrictLocal(const Entity &father, const Entity &son, bool initialize) const
Definition: adaptcallback.hh:64
void restrictLocal(EntityType &father, EntityType &son, bool initialize) const
restrict data to father
Definition: adaptcallback.hh:133
void preAdapt(const unsigned int estimateAdditionalElements)
Definition: adaptcallback.hh:44
void postRefinement(const Entity &father) const
Definition: adaptcallback.hh:59
void postAdapt()
Definition: adaptcallback.hh:49
Definition: adaptcallback.hh:27
AdaptDataHandle()
Definition: adaptcallback.hh:102
class for combining 2 index sets together for adaptation process
Definition: adaptcallback.hh:121
Definition: adaptcallback.hh:19
Grid abstract base classThis class is the base class for all grid implementations. Although no virtual functions are used we call it abstract since its methods do not contain an implementation but forward to the methods of the derived class via the Barton-Nackman trick.
Definition: common/grid.hh:386
void prolongLocal(EntityType &father, EntityType &son, bool initialize) const
prolong data to children
Definition: adaptcallback.hh:141
Base::Entity Entity
Definition: adaptcallback.hh:99
const Impl & asImp() const
Definition: adaptcallback.hh:75
void preCoarsening(const Entity &father) const
Definition: adaptcallback.hh:54
CombinedAdaptProlongRestrict(const A &a, const B &b)
constructor storing the two references
Definition: adaptcallback.hh:128
Impl & asImp()
Definition: adaptcallback.hh:80