3 #ifndef DUNE_ALU2DGRIDENTITY_HH 4 #define DUNE_ALU2DGRIDENTITY_HH 19 template<
int cd,
int dim,
class Gr
idImp>
21 template<
int cd, PartitionIteratorType pitype,
class Gr
idImp >
23 template<
int codim,
class Gr
idImp >
25 template<
int mydim,
int coorddim,
class Gr
idImp>
27 template<
class Gr
idImp>
29 template<
class Gr
idImp>
31 template<
class Gr
idImp>
33 template<
class Gr
idImp>
35 template<
int codim, PartitionIteratorType,
class Gr
idImp>
37 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
52 template<
int cd,
int dim,
class Gr
idImp>
56 static const int dimworld = GridImp::dimensionworld;
57 static const ALU2DSPACE ElementType eltype = GridImp::elementType;
80 typedef typename GridImp::Traits::template Codim< cd >::GeometryImpl GeometryImpl;
83 typedef typename GridImp :: GridObjectFactoryType
FactoryType;
89 typedef typename GridImp::template Codim<cd>::Entity
Entity;
91 typedef typename GridImp::template Codim<cd>::Geometry
Geometry;
94 typedef typename GridImp::template Codim<cd>::EntitySeed
EntitySeed;
97 typedef typename GridImp::template Codim<0>::EntityPointer
EntityPointer;
120 void setElement(
const ElementType &element,
int face=-1,
int level = -1)
const;
123 void setElement(
const HElementType & el,
const VertexType & vx);
152 const GridImp&
grid()
const {
return factory_.grid(); }
155 const FactoryType&
factory()
const {
return factory_; }
178 const FactoryType& factory_;
181 mutable ElementType * item_;
184 mutable GeometryImpl geoObj_;
209 template<
int dim,
class Gr
idImp>
213 static const int dimworld = GridImp::dimensionworld;
237 typedef typename GridImp::Traits::template Codim< 0 >::GeometryImpl GeometryImpl;
238 typedef typename GridImp::Traits::template Codim< 0 >::LocalGeometryImpl LocalGeometryImpl;
244 typedef typename GridImp::template Codim<0>::Geometry
Geometry;
249 typedef typename GridImp::template Codim<0>::EntitySeed
EntitySeed;
257 typedef typename GridImp::template Codim<0>::Entity
Entity;
290 return (cc==0) ? 1 : item_->numvertices();
299 return (codim==0) ? 1 : item_->numvertices();
318 ALU2dGridIntersectionIteratorType
ibegin () const
319 DUNE_DEPRECATED_MSG("Use ileafbegin() instead.")
325 ALU2dGridIntersectionIteratorType
iend () const
326 DUNE_DEPRECATED_MSG("Use ileafend() instead.")
333 return ALU2dGridLevelIntersectionIteratorType( *
this, this->
level(),
false);
335 ALU2dGridLevelIntersectionIteratorType
ilevelend ()
const 337 return ALU2dGridLevelIntersectionIteratorType( *
this, this->
level(),
true);
341 return ALU2dGridLeafIntersectionIteratorType( *
this, this->
level(),
false);
343 ALU2dGridLeafIntersectionIteratorType
ileafend ()
const 345 return ALU2dGridLeafIntersectionIteratorType( *
this, this->
level(),
true);
349 bool isLeaf ()
const;
353 EntityPointer father ()
const;
358 return (this->
level()>0);
383 template<
int codim >
391 if( item_->numvertices() == 3 )
394 switch (i) {
case 0 : j=2;
break;
399 else if ( codim == 2 )
401 if( item_->numvertices() == 4 )
403 switch (i) {
case 0 : j=0;
break;
409 return entity< codim >( j );
415 #if ALU2DGRID_PARALLEL 416 return grid().rankManager().partitionType( item_->getIndex() );
429 int subBoundaryId (
int i )
const;
442 LocalGeometry geometryInFather ()
const;
447 return ((item_->is(
ALU2DSPACE Refco::crs))==1);
452 return ((item_->wasRefined())==1);
463 bool mark(
int refCount)
const;
471 void setElement(
const HElementType &element,
int face=-1,
int level = -1)
const;
479 void reset (
int l );
501 const GridImp&
grid()
const {
return factory_.grid(); }
504 const FactoryType&
factory()
const {
return factory_; }
519 template<
int cc>
int getSubIndex (
int i)
const;
521 int subIndex (
int i,
unsigned int codim)
const;
524 const FactoryType& factory_;
527 mutable HElementType *item_;
530 mutable GeometryImpl geoObj_;
533 mutable bool isLeaf_;
547 template<
int codim,
class Gr
idImp >
553 static const int dim = GridImp::dimension;
554 static const int dimworld = GridImp::dimensionworld;
565 typedef typename GridImp::template Codim<codimension>::Entity
Entity;
568 typedef typename GridImp::template Codim<codimension>::EntitySeed
EntitySeed;
577 const ElementType &item,
599 bool equals (
const ThisType & i)
const;
602 Entity & dereference()
const ;
608 ThisType & operator = (
const ThisType & org);
611 const GridImp&
grid()
const {
return factory_.grid(); }
614 EntityImp & entityImp();
615 const EntityImp & entityImp()
const;
621 void updateEntityPointer( ElementType * item,
int face=-1,
int level=-1 );
635 #include "entity_imp.cc" PartitionType partitionType() const
return partition type of this entity ( see grid.hh )
Definition: alugrid/2d/entity.hh:413
GridImp::template Codim< cd >::Entity Entity
type of our interface entity
Definition: alugrid/2d/entity.hh:89
HElementType & getItem() const
Definition: alugrid/2d/entity.hh:488
int level() const
level of this element
int getFace() const
Definition: alugrid/2d/entity.hh:507
GridImp::template Codim< 0 >::Geometry Geometry
type of our Geometry interface
Definition: alugrid/2d/entity.hh:244
int boundaryId() const
Id of the boundary which is associated with the entity, returns 0 for inner entities, arbitrary int otherwise.
const GridImp & grid() const
return reference top grid
Definition: alugrid/2d/entity.hh:611
FieldVector< alu2d_ctype, dim > & positionInOwnersFather() const
my position in local coordinates of the owners father
#define ALU2DSPACE
Definition: alu2dinclude.hh:34
void setElement(const ElementType &element, int face=-1, int level=-1) const
set element as normal entity
Definition: alugrid/2d/grid.hh:60
EntitySeed seed() const
return seed of entity
Definition: alugrid/2d/entity.hh:165
ALU2dGridHierarchicIterator< GridImp > hbegin(int maxLevel) const
Definition: alugrid/2d/entity.hh:365
const GridImp & grid() const
return reference to grid
Definition: alugrid/2d/entity.hh:152
PartitionType
Attributes used in the generic overlap model.
Definition: gridenums.hh:28
GridImp::template Codim< 0 >::LocalGeometry LocalGeometry
type of corresponding interface local geometry
Definition: alugrid/2d/entity.hh:246
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
hierarchic index set of ALU2dGrid
Definition: alugrid/2d/grid.hh:66
void removeElement()
set item pointer to NULL
unsigned int subEntities(unsigned int codim) const
Definition: alugrid/2d/entity.hh:296
void setElement(const ALU2dGridEntity &org) const
Definition: alugrid/2d/entity.hh:124
EntitySeed seed() const
return seed of entity
Definition: alugrid/2d/entity.hh:495
int getIndex() const
index is unique within the grid hierachie and per codim
GridImp::template Codim< cd >::EntitySeed EntitySeed
typedef of my type
Definition: alugrid/2d/entity.hh:94
Definition: alugrid/2d/entity.hh:36
ALU2dGridIntersectionIteratorType iend() const
Definition: alugrid/2d/entity.hh:325
ALU2dGridEntityPointer< 0, GridImp > EntityPointer
tpye of entitypointer interface
Definition: alugrid/2d/entity.hh:260
Definition: alugrid/2d/entity.hh:24
int getFace() const
Definition: alugrid/2d/entity.hh:171
Codim< codim >::EntityPointer subEntity(int i) const
Definition: alugrid/2d/entity.hh:384
ALU2dGridEntityPointer< codimension, GridImp > EntityPointerImp
Definition: alugrid/2d/entity.hh:573
Definition: alugrid/2d/entity.hh:30
all entities
Definition: gridenums.hh:139
ALU2dGridLevelIntersectionIteratorType ilevelbegin() const
Definition: alugrid/2d/entity.hh:331
Dune::ALU2dImplTraits< dimworld, eltype >::template Codim< 2 >::InterfaceType VertexType
Definition: alugrid/2d/entity.hh:86
GridImp::template Codim< 0 >::Entity Entity
type of entity interface
Definition: alugrid/2d/entity.hh:257
Hierarchic Iterator of ALU2dGrid.
Definition: alugrid/2d/entity.hh:28
GridImp::template Codim< codimension >::EntitySeed EntitySeed
type of the seed
Definition: alugrid/2d/entity.hh:568
ALU2dGridLeafIntersectionIteratorType ileafend() const
Definition: alugrid/2d/entity.hh:343
bool isNew() const
Definition: alugrid/2d/entity.hh:450
Definition: alugrid/2d/entity.hh:26
const GridImp & grid() const
return reference to grid
Definition: alugrid/2d/entity.hh:501
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:327
bool hasFather() const
returns true if father entity exists
Definition: alugrid/2d/entity.hh:356
Dune::ALU2dImplTraits< dimworld, eltype >::template Codim< cd >::InterfaceType ElementType
Definition: alugrid/2d/entity.hh:85
ALU2dGridEntity(const FactoryType &factory, int level)
Constructor.
Definition: common/entity.hh:743
bool mightVanish() const
The former state() method has been replaced by:
Definition: alugrid/2d/entity.hh:445
LeafIntersectionIteratorWrapper< GridImp > ALU2dGridLeafIntersectionIteratorType
tpye of intersection iterator
Definition: alugrid/2d/entity.hh:252
GridImp::template Codim< 0 >::EntityPointer EntityPointer
tpye of EntityPointer
Definition: alugrid/2d/entity.hh:97
all interior entities
Definition: gridenums.hh:29
GridImp::template Codim< codimension >::Entity Entity
type of stored entity (interface)
Definition: alugrid/2d/entity.hh:565
HmeshType::helement_t HElementType
Definition: alu2dinclude.hh:108
ElementType & getItem() const
return reference to current item
Definition: alugrid/2d/entity.hh:158
ALU2dGridLevelIntersectionIteratorType ilevelend() const
Definition: alugrid/2d/entity.hh:335
ALU2dGridEntity< codimension, dim, GridImp > EntityImp
tpye of stored entity (implementation)
Definition: alugrid/2d/entity.hh:570
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/2d/entity.hh:241
bool equals(const ALU2dGridEntity< cd, dim, GridImp > &org) const
compare 2 elements
PartitionType partitionType() const
Definition: alugrid/2d/entity.hh:134
GeometryType type() const
return type of geometry
Definition: alugrid/2d/entity.hh:32
Default Implementations for EntityImp.
Definition: common/entity.hh:739
Definition: alugrid/2d/entity.hh:210
GridImp::template Codim< cd >::EntityPointer EntityPointer
Definition: alugrid/2d/entity.hh:265
GridImp::template Codim< cd >::Geometry Geometry
type of corresponding interface geometry
Definition: alugrid/2d/entity.hh:91
GridImp::template Codim< 0 >::EntitySeed EntitySeed
typedef of my type
Definition: alugrid/2d/entity.hh:249
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/2d/entity.hh:83
Geometry geometry() const
geometry of this entity
ALU2dGridLeafIntersectionIteratorType ileafbegin() const
Definition: alugrid/2d/entity.hh:339
const FactoryType & factory() const
return reference to factory
Definition: alugrid/2d/entity.hh:155
InterfaceType
Parameter to be used for the communication functions.
Definition: gridenums.hh:84
EntityPointer ownersFather() const
MakeableInterfaceObject< Entity > EntityObj
Definition: alugrid/2d/entity.hh:571
const FactoryType & factory_
reference to entity factory
Definition: alugrid/2d/entity.hh:624
int boundaryId() const
Id of the boundary which is associated with the entity, returns 0 for inner entities, arbitrary int otherwise.
Definition: alugrid/2d/entity.hh:306
Include standard header files.
Definition: agrid.hh:59
const FactoryType & factory() const
return reference to factory
Definition: alugrid/2d/entity.hh:504
EntitySeed seed_
the essential information
Definition: alugrid/2d/entity.hh:627
ALU2dGridLeafIntersectionIteratorType ALU2dGridIntersectionIteratorType
Definition: alugrid/2d/entity.hh:254
Definition: alugrid/2d/entity.hh:34
ALU2dGridHierarchicIterator< GridImp > hend(int maxLevel) const
Returns iterator to one past the last son.
Definition: alugrid/2d/entity.hh:371
Definition: alugrid/2d/entity.hh:20
GridImp::GridObjectFactoryType FactoryType
Definition: alugrid/2d/entity.hh:560
void setElement(const ALU2dGridEntity &org) const
Definition: alugrid/2d/entity.hh:474
Definition: alu2dinclude.hh:97
[ provides Dune::Grid ]
Definition: alugrid/2d/entity.hh:38
int count() const
Definition: alugrid/2d/entity.hh:287
LevelIntersectionIteratorWrapper< GridImp > ALU2dGridLevelIntersectionIteratorType
Definition: alugrid/2d/entity.hh:253
ALU2dGridIntersectionIteratorType ibegin() const
Definition: alugrid/2d/entity.hh:318
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:232
EntityObj * entity_
entity that this EntityPointer points to
Definition: alugrid/2d/entity.hh:630
Definition: alugrid/2d/entity.hh:22