3 #ifndef ALU2DGRID_ENTITYKEY_HH
4 #define ALU2DGRID_ENTITYKEY_HH
9 template<
int cd,
class Gr
idImp>
17 template<
int codim,
class Gr
idImp >
22 enum {
dim = GridImp::dimension };
28 friend class ALU2dGrid <GridImp :: dimension, GridImp::dimensionworld, GridImp::elementType >;
41 typedef typename GridImp::template Codim<codimension>::Entity
Entity;
102 bool equals (
const ALU2dGridEntitySeedType& i)
const;
131 template<
int cd,
class Gr
idImp>
138 enum { dim = GridImp::dimension };
139 enum { dimworld = GridImp::dimensionworld };
143 friend class ALU2dGrid <GridImp :: dimension, GridImp::dimensionworld, GridImp::elementType >;
146 typedef typename ImplTraits::template Codim<cd>
::InterfaceType ImplementationType;
147 typedef ImplementationType HElementType;
194 void set(
const HElementType &
item,
const int level,
const int duneFace )
235 template<
class Gr
idImp>
244 enum { dim = GridImp::dimension };
245 enum { dimworld = GridImp::dimensionworld };
249 friend class ALU2dGrid <GridImp :: dimension, GridImp::dimensionworld, GridImp::elementType >;
285 template <
int cd,
class Gr
idImp>
289 out << key.
item() <<
" " << key.
level() <<
" " << key.
face();
299 template<
int codim,
class Gr
idImp >
305 template<
int codim,
class Gr
idImp >
308 : item_( toKey(&item) )
311 template<
int codim,
class Gr
idImp >
317 template<
int codim,
class Gr
idImp >
326 template<
int codim,
class Gr
idImp >
331 return (item_ == i.
item_);
340 template<
int codim,
class Gr
idImp >
349 assert( (codim == 1) ? (
face_ >= 0) : 1 );
352 template<
int codim,
class Gr
idImp >
360 template<
int codim,
class Gr
idImp >
366 BaseType :: operator = ( org );
374 template<
int codim,
class Gr
idImp >
379 level_ = defaultValue ;
380 face_ = defaultValue ;
bool operator!=(const ALU2dGridEntitySeedType &i) const
inequality operator
Definition: alugrid/2d/entityseed.hh:82
ALU2dGridEntitySeed< codimension, GridImp > EntitySeedImp
make type of entity pointer implementation available in derived classes
Definition: alugrid/2d/entityseed.hh:50
static const int defaultValue
Definition: alugrid/2d/entityseed.hh:36
GridImp::template Codim< codimension >::Entity Entity
type of Entity
Definition: alugrid/2d/entityseed.hh:41
int face() const
return face
Definition: alugrid/2d/entityseed.hh:204
void clear()
invalidate seed
Definition: alugrid/2d/entityseed.hh:105
std::ostream & operator<<(std::ostream &out, const ALU2dGridEntitySeed< cd, GridImp > &key)
print alugrid entity key to std::stream
Definition: alugrid/2d/entityseed.hh:286
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:84
~ALU2dGridEntitySeedBase()
Destructor.
Definition: alugrid/2d/entityseed.hh:53
KeyType * item_
Definition: alugrid/2d/entityseed.hh:128
Definition: alu2dinclude.hh:97
[ provides Dune::Grid ]
Definition: alugrid/2d/entity.hh:38
ALU2dGridEntitySeedBase< codim, GridImp > ThisType
Definition: alugrid/2d/entityseed.hh:21
int level_
Definition: alugrid/2d/entityseed.hh:227
ImplementationType HElementType
Definition: alugrid/2d/entityseed.hh:32
Definition: alugrid/2d/entity.hh:210
Include standard header files.
Definition: agrid.hh:59
bool operator==(const ALU2dGridEntitySeedType &i) const
Definition: alugrid/2d/entityseed.hh:208
ThisType ALU2dGridEntitySeedType
typedef of my type
Definition: alugrid/2d/entityseed.hh:47
bool isValid() const
check for valid seed
Definition: alugrid/2d/entityseed.hh:91
MakeableInterfaceObject< Entity > EntityObject
underlying EntityImplementation
Definition: alugrid/2d/entityseed.hh:43
ALU2dGridEntitySeed(const HElementType &item, int, int)
Constructor for EntitySeed that points to an interior element.
Definition: alugrid/2d/entityseed.hh:274
int level() const
Definition: alugrid/2d/entityseed.hh:123
ALU2dGridEntitySeed(const ALU2dGridEntitySeedType &org)
copy constructor
Definition: alugrid/2d/entityseed.hh:278
void set(const HElementType &item, const int level, const int duneFace)
set element and level
Definition: alugrid/2d/entityseed.hh:194
int level() const
return level
Definition: alugrid/2d/entityseed.hh:202
EntityObject::ImplementationType EntityImp
Definition: alugrid/2d/entityseed.hh:44
ImplTraits::template Codim< cd >::InterfaceType ImplementationType
Definition: alugrid/2d/entityseed.hh:252
int face_
Definition: alugrid/2d/entityseed.hh:229
bool equals(const ALU2dGridEntitySeedType &i) const
equality
Definition: alugrid/2d/entityseed.hh:328
ALU2dGridEntitySeed(const HElementType &item)
Constructor for EntitySeed that points to an interior element.
Definition: alugrid/2d/entityseed.hh:270
ImplementationType KeyType
Definition: alugrid/2d/entityseed.hh:33
ImplementationType HElementType
Definition: alugrid/2d/entityseed.hh:253
GridImp::template Codim< cd >::Entity Entity
type of Entity
Definition: alugrid/2d/entityseed.hh:155
ALU2dGridEntitySeedBase< 0, GridImp > BaseType
Definition: alugrid/2d/entityseed.hh:240
bool operator==(const ALU2dGridEntitySeedType &i) const
equality operator
Definition: alugrid/2d/entityseed.hh:76
ThisType & operator=(const ThisType &org)
assignment operator
Definition: alugrid/2d/entityseed.hh:320
Definition: alugrid/2d/entityseed.hh:23
Definition: alugrid/2d/entity.hh:20
bool equals(const ALU2dGridEntitySeedType &key) const
equality, calls BaseType equals
Definition: alugrid/2d/entityseed.hh:219
ALU2dGridEntitySeed< cd, GridImp > ALU2dGridEntitySeedType
typedef of my type
Definition: alugrid/2d/entityseed.hh:158
Definition: alugrid/2d/entityseed.hh:18
Definition: alugrid/2d/entityseed.hh:10
ALU2dGridEntitySeed()
Constructor for EntitySeed that points to an element.
Definition: alugrid/2d/entityseed.hh:175
Definition: alugrid/2d/entityseed.hh:22
KeyType * toKey(const HElementType *item)
Definition: alugrid/2d/entityseed.hh:113
bool operator!=(const ALU2dGridEntitySeedType &i) const
Definition: alugrid/2d/entityseed.hh:213
ALU2dGridEntitySeedBase()
Constructor for EntitySeed that points to an element.
Definition: alugrid/2d/entityseed.hh:301
Entity::Implementation ImplementationType
Definition: common/grid.hh:1468
ALU2dGridEntitySeed(const ALU2dGridEntityType &entity)
Constructor for EntitySeed that points to given entity.
Definition: alugrid/2d/entityseed.hh:179
Definition: alugrid/2d/entityseed.hh:38
int face() const
Definition: alugrid/2d/entityseed.hh:124
void clear()
clear the key data structure
Definition: alugrid/2d/entityseed.hh:376
ALU2dGridEntitySeed< cd, GridImp > ThisType
Definition: alugrid/2d/entityseed.hh:243
ImplTraits::template Codim< codim >::InterfaceType ImplementationType
Definition: alugrid/2d/entityseed.hh:31
ThisType & operator=(const ThisType &org)
assignment operator
Definition: alugrid/2d/entityseed.hh:363
void set(const HElementType &item, const int level=-1, const int face=-1)
Definition: alugrid/2d/entityseed.hh:118
HElementType * item() const
get item from key
Definition: alugrid/2d/entityseed.hh:111
GridImp::template Codim< cd >::Entity Entity
type of Entity
Definition: alugrid/2d/entityseed.hh:261