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;
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 ;
std::ostream & operator<<(std::ostream &out, const ALU2dGridEntitySeed< cd, GridImp > &key)
print alugrid entity key to std::stream
Definition: alugrid/2d/entityseed.hh:286
ALU2dGridEntitySeed(const ALU2dGridEntityType &entity)
Constructor for EntitySeed that points to given entity.
Definition: alugrid/2d/entityseed.hh:179
KeyType * toKey(const HElementType *item)
Definition: alugrid/2d/entityseed.hh:113
ALU2dGridEntitySeed< codimension, GridImp > EntitySeedImp
make type of entity pointer implementation available in derived classes
Definition: alugrid/2d/entityseed.hh:50
bool operator==(const ALU2dGridEntitySeedType &i) const
Definition: alugrid/2d/entityseed.hh:208
GridImp::template Codim< cd >::Entity Entity
type of Entity
Definition: alugrid/2d/entityseed.hh:155
ThisType & operator=(const ThisType &org)
assignment operator
Definition: alugrid/2d/entityseed.hh:363
ImplementationType HElementType
Definition: alugrid/2d/entityseed.hh:32
void set(const HElementType &item, const int level, const int duneFace)
set element and level
Definition: alugrid/2d/entityseed.hh:194
void set(const HElementType &item, const int level=-1, const int face=-1)
Definition: alugrid/2d/entityseed.hh:118
ALU2dGridEntitySeed< cd, GridImp > ALU2dGridEntitySeedType
typedef of my type
Definition: alugrid/2d/entityseed.hh:158
ALU2dGridEntitySeed(const HElementType &item, int, int)
Constructor for EntitySeed that points to an interior element.
Definition: alugrid/2d/entityseed.hh:274
Definition: alugrid/2d/entity.hh:20
void clear()
invalidate seed
Definition: alugrid/2d/entityseed.hh:105
int face() const
Definition: alugrid/2d/entityseed.hh:124
ALU2dGridEntitySeed< cd, GridImp > ThisType
Definition: alugrid/2d/entityseed.hh:243
Definition: alugrid/2d/entityseed.hh:18
ImplTraits::template Codim< cd >::InterfaceType ImplementationType
Definition: alugrid/2d/entityseed.hh:252
KeyType * item_
Definition: alugrid/2d/entityseed.hh:128
ALU2dGridEntitySeed(const HElementType &item)
Constructor for EntitySeed that points to an interior element.
Definition: alugrid/2d/entityseed.hh:270
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
ImplTraits::template Codim< codim >::InterfaceType ImplementationType
Definition: alugrid/2d/entityseed.hh:31
Definition: alugrid/2d/entityseed.hh:38
ALU2dGridEntitySeed(const ALU2dGridEntitySeedType &org)
copy constructor
Definition: alugrid/2d/entityseed.hh:278
ALU2dGridEntitySeed()
Constructor for EntitySeed that points to an element.
Definition: alugrid/2d/entityseed.hh:175
bool isValid() const
check for valid seed
Definition: alugrid/2d/entityseed.hh:91
GridImp::template Codim< codimension >::Entity Entity
type of Entity
Definition: alugrid/2d/entityseed.hh:41
MakeableInterfaceObject< Entity > EntityObject
underlying EntityImplementation
Definition: alugrid/2d/entityseed.hh:43
bool operator!=(const ALU2dGridEntitySeedType &i) const
Definition: alugrid/2d/entityseed.hh:213
Entity::Implementation ImplementationType
Definition: common/grid.hh:1468
void clear()
clear the key data structure
Definition: alugrid/2d/entityseed.hh:376
bool equals(const ALU2dGridEntitySeedType &key) const
equality, calls BaseType equals
Definition: alugrid/2d/entityseed.hh:219
EntityObject::ImplementationType EntityImp
Definition: alugrid/2d/entityseed.hh:44
Definition: alugrid/2d/entityseed.hh:23
ImplementationType HElementType
Definition: alugrid/2d/entityseed.hh:253
int face() const
return face
Definition: alugrid/2d/entityseed.hh:204
ImplementationType KeyType
Definition: alugrid/2d/entityseed.hh:33
int level() const
Definition: alugrid/2d/entityseed.hh:123
int face_
Definition: alugrid/2d/entityseed.hh:229
static const int defaultValue
Definition: alugrid/2d/entityseed.hh:36
ThisType & operator=(const ThisType &org)
assignment operator
Definition: alugrid/2d/entityseed.hh:320
ALU2dGridEntitySeedBase< 0, GridImp > BaseType
Definition: alugrid/2d/entityseed.hh:240
bool operator==(const ALU2dGridEntitySeedType &i) const
equality operator
Definition: alugrid/2d/entityseed.hh:76
bool equals(const ALU2dGridEntitySeedType &i) const
equality
Definition: alugrid/2d/entityseed.hh:328
ALU2dGridEntitySeedBase< codim, GridImp > ThisType
Definition: alugrid/2d/entityseed.hh:21
ALU2dGridEntitySeedBase()
Constructor for EntitySeed that points to an element.
Definition: alugrid/2d/entityseed.hh:301
Definition: alu2dinclude.hh:97
Definition: alugrid/2d/entityseed.hh:22
Definition: alugrid/2d/entityseed.hh:10
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:84
Definition: alugrid/2d/entity.hh:210
int level_
Definition: alugrid/2d/entityseed.hh:227
int level() const
return level
Definition: alugrid/2d/entityseed.hh:202
~ALU2dGridEntitySeedBase()
Destructor.
Definition: alugrid/2d/entityseed.hh:53
[ provides Dune::Grid ]
Definition: alugrid/2d/entity.hh:38
bool operator!=(const ALU2dGridEntitySeedType &i) const
inequality operator
Definition: alugrid/2d/entityseed.hh:82
ThisType ALU2dGridEntitySeedType
typedef of my type
Definition: alugrid/2d/entityseed.hh:47