3 #ifndef ALU3DGRID_ENTITYKEY_HH
4 #define ALU3DGRID_ENTITYKEY_HH
9 template<
int cd,
class Gr
idImp>
17 template<
int codim,
class Gr
idImp >
22 enum {
dim = GridImp::dimension };
26 typedef typename GridImp::MPICommunicatorType
Comm;
35 typedef typename ImplTraits::template Codim<codim>::EntitySeedType
KeyType ;
40 template <int cd, class Key>
65 if( key->isboundary() )
67 return ((static_cast< BNDFaceType* > ( key ))->getGhost().first);
79 static bool isGhost(
KeyType* key) { assert( key );
return key->isboundary(); }
89 typedef typename GridImp::template Codim<codimension>::Entity
Entity;
211 template<
int cd,
class Gr
idImp>
218 enum { dim = GridImp::dimension };
219 enum { dimworld = GridImp::dimensionworld };
221 typedef typename GridImp::MPICommunicatorType Comm;
228 typedef typename ImplTraits::template Codim<cd>::ImplementationType ImplementationType;
229 typedef typename ImplTraits::template Codim<cd>
::InterfaceType HElementType;
231 typedef typename ImplTraits::BNDFaceType BNDFaceType;
323 template<
class Gr
idImp>
332 enum { dim = GridImp::dimension };
333 enum { dimworld = GridImp::dimensionworld };
335 typedef typename GridImp::MPICommunicatorType
Comm;
383 template <
int cd,
class Gr
idImp>
397 template<
int codim,
class Gr
idImp >
403 template<
int codim,
class Gr
idImp >
406 : item_( toKey(&item) )
409 template<
int codim,
class Gr
idImp >
412 : item_( toKey(&ghostFace) )
415 template<
int codim,
class Gr
idImp >
421 template<
int codim,
class Gr
idImp >
430 template<
int codim,
class Gr
idImp >
435 return (item_ == i.
item_);
444 template<
int codim,
class Gr
idImp >
456 template<
int codim,
class Gr
idImp >
465 template<
int codim,
class Gr
idImp >
471 BaseType :: operator = ( org );
480 template<
int codim,
class Gr
idImp >
485 level_ = defaultValue ;
486 twist_ = defaultTwist ;
487 face_ = defaultValue ;
static BNDFaceType * ghost(KeyType *key)
Definition: alugrid/3d/entityseed.hh:80
int twist() const
Definition: alugrid/3d/entityseed.hh:203
void clear()
clear the key data structure
Definition: alugrid/3d/entityseed.hh:482
HElementType * interior() const
return iterior item
Definition: alugrid/3d/entityseed.hh:168
int face() const
Definition: alugrid/3d/entityseed.hh:204
GridImp::MPICommunicatorType Comm
Definition: alugrid/3d/entityseed.hh:26
static Key * toKey(const HBndSegType *ghostFace)
Definition: alugrid/3d/entityseed.hh:57
int level() const
return level
Definition: alugrid/3d/entityseed.hh:286
Definition: alugrid/3d/entityseed.hh:86
std::ostream & operator<<(std::ostream &out, const ALU2dGridEntitySeed< cd, GridImp > &key)
print alugrid entity key to std::stream
Definition: alugrid/2d/entityseed.hh:286
bool operator==(const ALU3dGridEntitySeedType &i) const
Definition: alugrid/3d/entityseed.hh:294
static const int defaultTwist
Definition: alugrid/3d/entityseed.hh:84
bool operator==(const ALU3dGridEntitySeedType &i) const
equality operator
Definition: alugrid/3d/entityseed.hh:130
bool equals(const ALU3dGridEntitySeedType &i) const
equality
Definition: alugrid/3d/entityseed.hh:432
[ provides Dune::Grid ]
Definition: alugrid/3d/entity.hh:36
Definition: alugrid/3d/entityseed.hh:18
ALU3dGridEntitySeed< cd, GridImp > ThisType
Definition: alugrid/3d/entityseed.hh:331
ALU3dGridEntitySeed< cd, GridImp > ALU3dGridEntitySeedType
typedef of my type
Definition: alugrid/3d/entityseed.hh:242
ImplTraits::template Codim< codim >::ImplementationType ImplementationType
Definition: alugrid/3d/entityseed.hh:33
ALU3dGridEntitySeed(const HBndSegType &ghostFace)
Constructor for EntitySeed that points to an ghost.
Definition: alugrid/3d/entityseed.hh:372
static const int defaultValue
Definition: alugrid/3d/entityseed.hh:83
void set(const HElementType &item)
Definition: alugrid/3d/entityseed.hh:187
ThisType & operator=(const ThisType &org)
assignment operator
Definition: alugrid/3d/entityseed.hh:468
ALU3dGridEntitySeed< codimension, GridImp > EntitySeedImp
make type of entity pointer implementation available in derived classes
Definition: alugrid/3d/entityseed.hh:98
ALU3dGridEntitySeedBase< 0, GridImp > BaseType
Definition: alugrid/3d/entityseed.hh:328
int twist() const
return twist
Definition: alugrid/3d/entityseed.hh:288
~ALU3dGridEntitySeedBase()
Destructor.
Definition: alugrid/3d/entityseed.hh:101
ImplTraits::template Codim< cd >::ImplementationType ImplementationType
Definition: alugrid/3d/entityseed.hh:342
GridImp::template Codim< cd >::Entity Entity
type of Entity
Definition: alugrid/3d/entityseed.hh:355
int face_
Definition: alugrid/3d/entityseed.hh:317
static bool isGhost(KeyType *)
Definition: alugrid/3d/entityseed.hh:51
Definition: alugrid/3d/entityseed.hh:10
EntityObject::ImplementationType EntityImp
Definition: alugrid/3d/entityseed.hh:92
int level_
Definition: alugrid/3d/entityseed.hh:313
static bool isGhost(KeyType *key)
Definition: alugrid/3d/entityseed.hh:79
bool isGhost() const
methods for ghosts
Definition: alugrid/3d/entityseed.hh:175
KeyType * item_
Definition: alugrid/3d/entityseed.hh:208
Definition: alu3dinclude.hh:201
ALU3dGridEntitySeedBase()
Constructor for EntitySeed that points to an element.
Definition: alugrid/3d/entityseed.hh:399
ALU3dGridEntitySeed(const ALU3dGridEntitySeedType &org)
copy constructor
Definition: alugrid/3d/entityseed.hh:376
ImplTraits::BNDFaceType BNDFaceType
Definition: alugrid/3d/entityseed.hh:37
ImplTraits::BNDFaceType BNDFaceType
Definition: alugrid/3d/entityseed.hh:345
BNDFaceType * ghost() const
Definition: alugrid/3d/entityseed.hh:176
bool operator!=(const ALU3dGridEntitySeedType &i) const
inequality operator
Definition: alugrid/3d/entityseed.hh:136
MakeableInterfaceObject< Entity > EntityObject
underlying EntityImplementation
Definition: alugrid/3d/entityseed.hh:91
Definition: alugrid/3d/entity.hh:202
Definition: alugrid/3d/entityseed.hh:41
ALU3dGridEntitySeed()
Constructor for EntitySeed that points to an element.
Definition: alugrid/3d/entityseed.hh:260
ThisType ALU3dGridEntitySeedType
typedef of my type
Definition: alugrid/3d/entityseed.hh:95
void set(const HBndSegType &ghostFace)
Definition: alugrid/3d/entityseed.hh:197
KeyType * toKey(const HBndSegType *ghostFace)
Definition: alugrid/3d/entityseed.hh:192
KeyType * toKey(const HElementType *item)
Definition: alugrid/3d/entityseed.hh:182
ALU3dGridEntitySeed(const HElementType &item, int, int, int)
Constructor for EntitySeed that points to an interior element.
Definition: alugrid/3d/entityseed.hh:368
static HElementType * getItem(KeyType *key)
Definition: alugrid/3d/entityseed.hh:47
ALU3dGridEntitySeed(const ALU3dGridEntityType &entity)
Constructor for EntitySeed that points to given entity.
Definition: alugrid/3d/entityseed.hh:264
Entity::Implementation ImplementationType
Definition: common/grid.hh:1377
bool isValid() const
check for valid seed
Definition: alugrid/3d/entityseed.hh:145
Definition: alugrid/3d/entityseed.hh:23
ThisType & operator=(const ThisType &org)
assignment operator
Definition: alugrid/3d/entityseed.hh:424
ImplTraits::template Codim< cd >::InterfaceType HElementType
Definition: alugrid/3d/entityseed.hh:343
ALU3dGridEntitySeedBase< codim, GridImp > ThisType
Definition: alugrid/3d/entityseed.hh:21
ImplTraits::template Codim< codim >::InterfaceType HElementType
Definition: alugrid/3d/entityseed.hh:34
bool operator!=(const ALU3dGridEntitySeedType &i) const
Definition: alugrid/3d/entityseed.hh:299
GridImp::template Codim< codimension >::Entity Entity
type of Entity
Definition: alugrid/3d/entityseed.hh:89
static HElementType * getItem(KeyType *key)
Definition: alugrid/3d/entityseed.hh:61
static Key * toKey(const HBndSegType *)
Definition: alugrid/3d/entityseed.hh:43
ALU3dGridEntitySeed(const HElementType &item)
Constructor for EntitySeed that points to an interior element.
Definition: alugrid/3d/entityseed.hh:364
int twist_
Definition: alugrid/3d/entityseed.hh:315
Definition: alugrid/3d/entityseed.hh:22
static BNDFaceType * ghost(KeyType *)
Definition: alugrid/3d/entityseed.hh:52
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:80
Definition: alugrid/3d/entity.hh:22
HElementType * item() const
get item from key
Definition: alugrid/3d/entityseed.hh:165
GridImp::template Codim< cd >::Entity Entity
type of Entity
Definition: alugrid/3d/entityseed.hh:239
int level() const
Definition: alugrid/3d/entityseed.hh:202
void clear()
invalidate seed
Definition: alugrid/3d/entityseed.hh:159
GridImp::MPICommunicatorType Comm
Definition: alugrid/3d/entityseed.hh:335
void set(const HElementType &item, const int level)
set element and level
Definition: alugrid/3d/entityseed.hh:279
int face() const
return face
Definition: alugrid/3d/entityseed.hh:290
bool equals(const ALU3dGridEntitySeedType &key) const
equality, calls BaseType equals
Definition: alugrid/3d/entityseed.hh:305
ImplTraits::HBndSegType HBndSegType
Definition: alugrid/3d/entityseed.hh:38
ImplTraits::HBndSegType HBndSegType
Definition: alugrid/3d/entityseed.hh:346
ImplTraits::template Codim< codim >::EntitySeedType KeyType
Definition: alugrid/3d/entityseed.hh:35