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;
30 friend class ALU3dGrid < GridImp::elementType, 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;
156 bool equals (
const ALU3dGridEntitySeedType& i)
const;
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;
281 BaseType :: set( item );
286 int level ()
const {
return level_ ; }
288 int twist ()
const {
return twist_ ; }
290 int face ()
const {
return face_ ; }
292 using BaseType :: set ;
308 return BaseType :: equals( key ) && (
level() == key.
level());
323 template<
class Gr
idImp>
332 enum {
dim = GridImp::dimension };
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 >
409 template<
int codim,
class Gr
idImp >
415 template<
int codim,
class Gr
idImp >
421 template<
int codim,
class Gr
idImp >
430 template<
int codim,
class Gr
idImp >
444 template<
int codim,
class Gr
idImp >
456 template<
int codim,
class Gr
idImp >
465 template<
int codim,
class Gr
idImp >
480 template<
int codim,
class Gr
idImp >
ThisType & operator=(const ThisType &org)
assignment operator
Definition: alugrid/3d/entityseed.hh:424
static const int defaultValue
Definition: alugrid/3d/entityseed.hh:83
ImplTraits::template Codim< codim >::EntitySeedType KeyType
Definition: alugrid/3d/entityseed.hh:35
[ provides Dune::Grid ]
Definition: alugrid/3d/entity.hh:36
int level() const
return level
Definition: alugrid/3d/entityseed.hh:286
ALU3dGridEntitySeed()
Constructor for EntitySeed that points to an element.
Definition: alugrid/3d/entityseed.hh:260
Definition: alugrid/3d/entityseed.hh:22
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
int twist_
Definition: alugrid/3d/entityseed.hh:315
ALU3dGridEntitySeed< codimension, GridImp > EntitySeedImp
make type of entity pointer implementation available in derived classes
Definition: alugrid/3d/entityseed.hh:98
int face() const
Definition: alugrid/3d/entityseed.hh:204
ALU3dGridEntitySeed< cd, GridImp > ThisType
Definition: alugrid/3d/entityseed.hh:331
EntityObject::ImplementationType EntityImp
Definition: alugrid/3d/entityseed.hh:92
ALU3dGridEntitySeed(const ALU3dGridEntityType &entity)
Constructor for EntitySeed that points to given entity.
Definition: alugrid/3d/entityseed.hh:264
int face() const
return face
Definition: alugrid/3d/entityseed.hh:290
ALU3dGridEntitySeedBase< 0, GridImp > BaseType
Definition: alugrid/3d/entityseed.hh:328
bool operator!=(const ALU3dGridEntitySeedType &i) const
inequality operator
Definition: alugrid/3d/entityseed.hh:136
Definition: alugrid/3d/entityseed.hh:86
static HElementType * getItem(KeyType *key)
Definition: alugrid/3d/entityseed.hh:61
ImplTraits::template Codim< codim >::ImplementationType ImplementationType
Definition: alugrid/3d/entityseed.hh:33
Definition: alu3dinclude.hh:201
void clear()
clear the key data structure
Definition: alugrid/3d/entityseed.hh:482
KeyType * toKey(const HElementType *item)
Definition: alugrid/3d/entityseed.hh:182
MakeableInterfaceObject< Entity > EntityObject
underlying EntityImplementation
Definition: alugrid/3d/entityseed.hh:91
GridImp::template Codim< cd >::Entity Entity
type of Entity
Definition: alugrid/3d/entityseed.hh:355
Definition: alugrid/3d/entityseed.hh:23
GridImp::template Codim< cd >::Entity Entity
type of Entity
Definition: alugrid/3d/entityseed.hh:239
bool operator==(const ALU3dGridEntitySeedType &i) const
equality operator
Definition: alugrid/3d/entityseed.hh:130
static Key * toKey(const HBndSegType *ghostFace)
Definition: alugrid/3d/entityseed.hh:57
ImplTraits::HBndSegType HBndSegType
Definition: alugrid/3d/entityseed.hh:346
~ALU3dGridEntitySeedBase()
Destructor.
Definition: alugrid/3d/entityseed.hh:101
ThisType & operator=(const ThisType &org)
assignment operator
Definition: alugrid/3d/entityseed.hh:468
bool equals(const ALU3dGridEntitySeedType &key) const
equality, calls BaseType equals
Definition: alugrid/3d/entityseed.hh:305
ImplTraits::template Codim< codim >::InterfaceType HElementType
Definition: alugrid/3d/entityseed.hh:34
ALU3dGridEntitySeed(const ALU3dGridEntitySeedType &org)
copy constructor
Definition: alugrid/3d/entityseed.hh:376
void clear()
invalidate seed
Definition: alugrid/3d/entityseed.hh:159
static Key * toKey(const HBndSegType *)
Definition: alugrid/3d/entityseed.hh:43
static BNDFaceType * ghost(KeyType *key)
Definition: alugrid/3d/entityseed.hh:80
bool isGhost() const
methods for ghosts
Definition: alugrid/3d/entityseed.hh:175
KeyType * item_
Definition: alugrid/3d/entityseed.hh:208
ImplTraits::BNDFaceType BNDFaceType
Definition: alugrid/3d/entityseed.hh:37
static BNDFaceType * ghost(KeyType *)
Definition: alugrid/3d/entityseed.hh:52
HElementType * item() const
get item from key
Definition: alugrid/3d/entityseed.hh:165
ALU3dGridEntitySeed(const HBndSegType &ghostFace)
Constructor for EntitySeed that points to an ghost.
Definition: alugrid/3d/entityseed.hh:372
ThisType ALU3dGridEntitySeedType
typedef of my type
Definition: alugrid/3d/entityseed.hh:95
Definition: alugrid/3d/entity.hh:202
int twist() const
Definition: alugrid/3d/entityseed.hh:203
HElementType * interior() const
return iterior item
Definition: alugrid/3d/entityseed.hh:168
GridImp::MPICommunicatorType Comm
Definition: alugrid/3d/entityseed.hh:335
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:84
KeyType * toKey(const HBndSegType *ghostFace)
Definition: alugrid/3d/entityseed.hh:192
ImplTraits::HBndSegType HBndSegType
Definition: alugrid/3d/entityseed.hh:38
Include standard header files.
Definition: agrid.hh:59
ALU3dGridEntitySeedBase< codim, GridImp > ThisType
Definition: alugrid/3d/entityseed.hh:21
ALU3dGridEntitySeedBase()
Constructor for EntitySeed that points to an element.
Definition: alugrid/3d/entityseed.hh:399
std::ostream & operator<<(std::ostream &out, const ALU2dGridEntitySeed< cd, GridImp > &key)
print alugrid entity key to std::stream
Definition: alugrid/2d/entityseed.hh:286
ImplTraits::template Codim< cd >::ImplementationType ImplementationType
Definition: alugrid/3d/entityseed.hh:342
Entity::Implementation ImplementationType
Definition: common/grid.hh:1468
GridImp::template Codim< codimension >::Entity Entity
type of Entity
Definition: alugrid/3d/entityseed.hh:89
static bool isGhost(KeyType *key)
Definition: alugrid/3d/entityseed.hh:79
BNDFaceType * ghost() const
Definition: alugrid/3d/entityseed.hh:176
GridImp::MPICommunicatorType Comm
Definition: alugrid/3d/entityseed.hh:26
ImplTraits::template Codim< cd >::InterfaceType HElementType
Definition: alugrid/3d/entityseed.hh:343
static bool isGhost(KeyType *)
Definition: alugrid/3d/entityseed.hh:51
Definition: alugrid/3d/entityseed.hh:41
bool isValid() const
check for valid seed
Definition: alugrid/3d/entityseed.hh:145
int face_
Definition: alugrid/3d/entityseed.hh:317
ALU3dGridEntitySeed(const HElementType &item)
Constructor for EntitySeed that points to an interior element.
Definition: alugrid/3d/entityseed.hh:364
int level() const
Definition: alugrid/3d/entityseed.hh:202
Definition: alugrid/3d/entity.hh:22
Definition: alugrid/3d/entityseed.hh:18
Definition: alugrid/3d/entityseed.hh:10
ImplTraits::BNDFaceType BNDFaceType
Definition: alugrid/3d/entityseed.hh:345
static const int defaultTwist
Definition: alugrid/3d/entityseed.hh:84
int level_
Definition: alugrid/3d/entityseed.hh:313
int twist() const
return twist
Definition: alugrid/3d/entityseed.hh:288
bool equals(const ALU3dGridEntitySeedType &i) const
equality
Definition: alugrid/3d/entityseed.hh:432