3#ifndef DUNE_ADAPTCALLBACK_HH
4#define DUNE_ADAPTCALLBACK_HH
18 template<
class Gr
id,
class Impl >
19 class AdaptDataHandle;
29 template<
class Gr
id,
class Impl >
34 friend class AdaptDataHandle<
Grid, Impl >;
54 asImp().preCoarsening( father );
64 asImp().postRefinement( father );
67 void restrictLocal(
const Entity &father,
const Entity& son,
bool initialize )
69 asImp().restrictLocal( father, son, initialize );
72 void prolongLocal(
const Entity &father,
const Entity& son,
bool initialize )
74 asImp().prolongLocal( father, son, initialize );
78 const Impl &asImp ()
const {
return static_cast< const Impl &
>( *this ); }
79 Impl &asImp () {
return static_cast< Impl &
>( *this ); }
87 template<
class Gr
id,
class Impl >
89 :
public AdaptDataHandleInterface< Grid, Impl >
91 typedef AdaptDataHandle< Grid, Impl > This;
92 typedef AdaptDataHandleInterface< Grid, Impl > Base;
95 typedef typename Base::Entity Entity;
102 AdaptDataHandle (
const This & );
103 This &operator= (
const This & );
105 void preCoarsening (
const Entity &father );
106 void postRefinement (
const Entity &father );
114 template <
class A,
class B >
126 template <
class Entity>
129 _a.restrictLocal(father,son,initialize);
130 _b.restrictLocal(father,son,initialize);
134 template <
class Entity>
137 _a.prolongLocal(father,son,initialize);
138 _b.prolongLocal(father,son,initialize);
Interface class for the Grid's adapt method where the parameter is a AdaptDataHandleInterface.
Definition: adaptcallback.hh:31
void postRefinement(const Entity &father)
call back for activity to take place on newly created elements below the father element.
Definition: adaptcallback.hh:62
void preCoarsening(const Entity &father)
call back for activity to take place on father and all decendants before the decendants are removed
Definition: adaptcallback.hh:52
class for combining 2 index sets together for adaptation process
Definition: adaptcallback.hh:116
CombinedAdaptProlongRestrict(A &a, B &b)
constructor storing the two references
Definition: adaptcallback.hh:122
void restrictLocal(const Entity &father, const Entity &son, bool initialize)
restrict data to father
Definition: adaptcallback.hh:127
void prolongLocal(const Entity &father, const Entity &son, bool initialize)
prolong data to children
Definition: adaptcallback.hh:135
Wrapper class for entities.
Definition: entity.hh:62
Grid abstract base class.
Definition: grid.hh:388
Dune namespace.
Definition: alignment.hh:10
Static tag representing a codimension.
Definition: dimension.hh:22