5 #ifndef DUNE_GRID_COMMON_ADAPTCALLBACK_HH 6 #define DUNE_GRID_COMMON_ADAPTCALLBACK_HH 20 template<
class Gr
id,
class Impl >
31 template<
class Gr
id,
class Impl >
46 This &operator= (
const This & );
56 asImp().preCoarsening( father );
66 asImp().postRefinement( father );
71 asImp().restrictLocal( father, son, initialize );
76 asImp().prolongLocal( father, son, initialize );
80 const Impl &
asImp ()
const {
return static_cast< const Impl &
>( *this ); }
81 Impl &
asImp () {
return static_cast< Impl &
>( *this ); }
89 template<
class Gr
id,
class Impl >
91 :
public AdaptDataHandleInterface< Grid, Impl >
93 typedef AdaptDataHandle< Grid, Impl > This;
94 typedef AdaptDataHandleInterface< Grid, Impl > Base;
105 This &operator= (
const This & );
107 void preCoarsening (
const Entity &father );
108 void postRefinement (
const Entity &father );
116 template <
class A,
class B >
128 template <
class Entity>
131 _a.restrictLocal(father,son,initialize);
132 _b.restrictLocal(father,son,initialize);
136 template <
class Entity>
139 _a.prolongLocal(father,son,initialize);
140 _b.prolongLocal(father,son,initialize);
Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface.
Definition: adaptcallback.hh:32
concept Entity
Model of a grid entity.
Definition: concepts/entity.hh:119
void restrictLocal(const Entity &father, const Entity &son, bool initialize)
Definition: adaptcallback.hh:69
void restrictLocal(const Entity &father, const Entity &son, bool initialize)
restrict data to father
Definition: adaptcallback.hh:129
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:375
void prolongLocal(const Entity &father, const Entity &son, bool initialize)
prolong data to children
Definition: adaptcallback.hh:137
const Impl & asImp() const
Definition: adaptcallback.hh:80
void postRefinement(const Entity &father)
call back for activity to take place on newly created elements below the father element.
Definition: adaptcallback.hh:64
Grid::template Codim< 0 >::Entity Entity
Definition: adaptcallback.hh:39
Base::Entity Entity
Definition: adaptcallback.hh:97
AdaptDataHandle()
Definition: adaptcallback.hh:100
void prolongLocal(const Entity &father, const Entity &son, bool initialize)
Definition: adaptcallback.hh:74
Impl & asImp()
Definition: adaptcallback.hh:81
CombinedAdaptProlongRestrict(A &a, B &b)
constructor storing the two references
Definition: adaptcallback.hh:124
Include standard header files.
Definition: agrid.hh:59
Definition: adaptcallback.hh:21
Wrapper class for entities.
Definition: common/entity.hh:65
class for combining 2 index sets together for adaptation process
Definition: adaptcallback.hh:117
void preCoarsening(const Entity &father)
call back for activity to take place on father and all descendants before the descendants are removed...
Definition: adaptcallback.hh:54