3#ifndef DUNE_ADAPTCALLBACK_HH
4#define DUNE_ADAPTCALLBACK_HH
18 template<
class Gr
id,
class Impl >
19 class AdaptDataHandle;
26 template<
class Gr
id,
class Impl >
27 class AdaptDataHandleInterface
29 typedef AdaptDataHandleInterface< Grid, Impl > This;
31 friend class AdaptDataHandle< Grid, Impl >;
34 typedef typename Grid::template Codim< 0 >::Entity Entity;
37 AdaptDataHandleInterface ()
40 AdaptDataHandleInterface (
const This & );
41 This &operator= (
const This & );
44 void preAdapt (
const unsigned int estimateAdditionalElements )
46 asImp().preAdapt( estimateAdditionalElements );
54 void preCoarsening (
const Entity &father )
const
56 asImp().preCoarsening( father );
59 void postRefinement (
const Entity &father )
const
61 asImp().postRefinement( father );
64 void restrictLocal(
const Entity &father,
const Entity& son,
bool initialize )
const
66 asImp().restrictLocal( father, son, initialize );
69 void prolongLocal(
const Entity &father,
const Entity& son,
bool initialize )
const
71 asImp().prolongLocal( father, son, initialize );
75 const Impl &asImp ()
const
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 >
95 typedef AdaptDataHandle< Grid, Impl > This;
96 typedef AdaptDataHandleInterface< Grid, Impl > Base;
99 typedef typename Base::Entity Entity;
106 AdaptDataHandle (
const This & );
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);
class for combining 2 index sets together for adaptation process
Definition: adaptcallback.hh:122
void restrictLocal(EntityType &father, EntityType &son, bool initialize) const
restrict data to father
Definition: adaptcallback.hh:133
void prolongLocal(EntityType &father, EntityType &son, bool initialize) const
prolong data to children
Definition: adaptcallback.hh:141
CombinedAdaptProlongRestrict(const A &a, const B &b)
constructor storing the two references
Definition: adaptcallback.hh:128
Dune namespace.
Definition: alignment.hh:14