1 #ifndef ALUGRID_ENTITY_INLINE_HH
2 #define ALUGRID_ENTITY_INLINE_HH
3 #include <dune/common/exceptions.hh>
16 template<
int dim,
class Gr
idImp>
25 template<
int dim,
class Gr
idImp>
27 reset (
int walkLevel )
37 template<
int dim,
class Gr
idImp>
48 template<
int dim,
class Gr
idImp>
59 template<
int dim,
class Gr
idImp>
64 item_ =
static_cast<IMPLElementType *
> (&element);
74 template<
int dim,
class Gr
idImp>
79 item_ =
static_cast<IMPLElementType *
> ( ghost.getGhost().first );
86 ghost_ =
static_cast<BNDFaceType *
> (&ghost);
98 template<
int dim,
class Gr
idImp>
103 return item_->level();
106 template<
int dim,
class Gr
idImp>
110 return (item_ == org.
item_);
113 template<
int dim,
class Gr
idImp>
120 template<
int dim,
class Gr
idImp>
124 return (*item_).getIndex();
127 template<
int dim,
class Gr
idImp>
131 return subEntities( cc );
134 template<
int dim,
class Gr
idImp>
137 return GridImp::referenceElement().size( codim );
140 template<
int dim,
class Gr
idImp>
147 return (isGhost() ? GhostEntity : InteriorEntity);
150 template<
int dim,
class Gr
idImp>
159 BNDFaceType * dwn =
static_cast<BNDFaceType *
> (ghost_->down());
160 return ( dwn ) ? (dwn->ghostLevel() ==
level()) :
true;
165 return ! item_->down();
169 template<
int dim,
class Gr
idImp>
183 template<
int dim,
class Gr
idImp>
191 template<
int dim,
class Gr
idImp>
195 return item_->hasBeenRefined();
198 template<
int dim,
class Gr
idImp>
202 return ((*item_).requestrule() == coarse_element_t);
211 template<
int codim,
class Gr
idImp >
219 template<
int codim,
class Gr
idImp >
227 template<
int codim,
class Gr
idImp >
236 template<
int codim,
class Gr
idImp >
244 template<
int codim,
class Gr
idImp >
248 , entity_( GridImp::getRealImplementation(org.entity_) )
254 template<
int codim,
class Gr
idImp >
263 template<
int codim,
class Gr
idImp >
271 if( seed_.isValid() )
274 entityImp().setEntity( org.
entityImp() );
282 template<
int codim,
class Gr
idImp >
288 template<
int codim,
class Gr
idImp >
293 return (seed_.equals( i.
seed_ ));
296 template<
int codim,
class Gr
idImp >
300 seed_.set( ghostFace );
301 if( seed_.isValid() )
303 entityImp().setGhost( ghostFace );
307 template<
int codim,
class Gr
idImp >
312 if( seed_.isValid() )
314 entityImp().setElement( *item );
324 template<
int codim,
class Gr
idImp >
328 seed_.set( *item, level );
329 if( seed_.isValid() )
331 entityImp().setElement( seed_ );
#define alugrid_assert(EX)
Definition: alugrid_assert.hh:20
Definition: alu3dinclude.hh:80
GeometryType type() const
type of geometry of this entity
Definition: entity.hh:113
void removeElement()
reset item pointer to NULL
Definition: entity.hh:127
int level() const
level of this element
Definition: entity.hh:154
PartitionType partitionType() const
return partition type of this entity ( see grid.hh )
Definition: entity.hh:157
void setEntity(const ALU3dGridEntity< cd, dim, GridImp > &org)
set item from other entity, mainly for copy constructor of entity pointer
Definition: entity_imp.cc:41
void setElement(const HItemType &item)
Definition: entity_imp.cc:48
GeometryImpl geo_
the current geometry
Definition: entity.hh:167
void setGhost(const HBndSegType &ghost)
setGhost is not valid for this codim
Definition: entity_imp.cc:80
int getIndex() const
index is unique within the grid hierarchy and per codim
Definition: entity.hh:161
bool equals(const ALU3dGridEntity< cd, dim, GridImp > &org) const
compare 2 elements by comparing the item pointers
Definition: entity.hh:134
ImplTraits::template Codim< dim, cd >::InterfaceType HElementType
Definition: entity.hh:643
void updateEntityPointer(HElementType *item, int level)
Definition: entity_inline.hh:326
Definition: iterator.hh:713
Definition: entity.hh:195
BNDFaceType * ghost_
not zero if entity is ghost entity
Definition: entity.hh:447
GridImp::template Codim< 0 >::EntitySeed EntitySeed
typedef of my type
Definition: entity.hh:265
IMPLElementType * item_
Definition: entity.hh:444
Definition: entity.hh:463
void updateGhostPointer(HBndSegType &ghostFace)
Definition: entity_inline.hh:298
ALU3dGridEntityPointerBase()
default empty constructor
Definition: entity_inline.hh:238
EntityImp & entityImp() const
Definition: entity.hh:549
ALU3dGridEntitySeedType seed_
Definition: entity.hh:543
bool equals(const ALU3dGridEntityPointerType &i) const
equality
Definition: entity_inline.hh:290
EntityObject entity_
Definition: entity.hh:546
ThisType & operator=(const ThisType &org)
assignment operator
Definition: entity_inline.hh:257
void done()
has to be called when iterator is finished
Definition: entity_inline.hh:283
void clone(const ALU3dGridEntityPointerType &org)
Definition: entity_inline.hh:266
void updateEntityPointer(HElementType *item, int level=-1)
Definition: entity_inline.hh:309