1 #ifndef DUNE_ALU2DGRIDENTITY_HH
2 #define DUNE_ALU2DGRIDENTITY_HH
17 template<
int cd,
int dim,
class Gr
idImp>
18 class ALU2dGridEntity;
19 template<
int cd, PartitionIteratorType pitype,
class Gr
idImp >
20 class ALU2dGridLevelIterator;
21 template<
int codim,
class Gr
idImp >
22 class ALU2dGridEntityPointer;
23 template<
int mydim,
int coorddim,
class Gr
idImp>
24 class ALU2dGridGeometry;
25 template<
class Gr
idImp>
26 class ALU2dGridHierarchicIterator;
27 template<
class Gr
idImp>
28 class ALU2dGridLevelIntersectionIterator;
29 template<
class Gr
idImp>
30 class ALU2dGridLeafIntersectionIterator;
31 template<
class Gr
idImp>
32 class ALU2dGridIntersectionIterator;
33 template<
int codim, PartitionIteratorType,
class Gr
idImp>
34 class ALU2dGridLeafIterator;
35 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
50 template<
int cd,
int dim,
class Gr
idImp>
58 friend class ALU2dGridIntersectionIterator < GridImp >;
59 friend class ALU2dGridIntersectionIterator < const GridImp >;
72 friend class ALU2dGridMakeableEntity<0,dim,GridImp>;
78 typedef typename GridImp::Traits::template Codim< cd >::GeometryImpl GeometryImpl;
81 typedef typename GridImp :: GridObjectFactoryType
FactoryType;
87 typedef typename GridImp::template Codim<cd>::Entity
Entity;
89 typedef typename GridImp::template Codim<cd>::Geometry
Geometry;
92 typedef typename GridImp::template Codim<cd>::EntitySeed
EntitySeed;
95 typedef typename GridImp::template Codim<0>::EntityPointer
EntityPointer;
150 const GridImp&
grid()
const {
return factory_.grid(); }
182 mutable GeometryImpl geoObj_;
207 template<
int dim,
class Gr
idImp>
215 friend class ALU2dGridIntersectionIterator < GridImp >;
216 friend class ALU2dGridIntersectionIterator < const GridImp >;
229 friend class ALU2dGridMakeableEntity<0,dim,GridImp>;
235 typedef typename GridImp::Traits::template Codim< 0 >::GeometryImpl GeometryImpl;
236 typedef typename GridImp::Traits::template Codim< 0 >::LocalGeometryImpl LocalGeometryImpl;
242 typedef typename GridImp::template Codim<0>::Geometry
Geometry;
247 typedef typename GridImp::template Codim<0>::EntitySeed
EntitySeed;
255 typedef typename GridImp::template Codim<0>::Entity
Entity;
288 return (cc==0) ? 1 : item_->numvertices();
335 bool isLeaf ()
const;
342 bool hasFather ()
const
344 return (this->
level()>0);
365 typename Codim<cc>::EntityPointer entity (
int i)
const;
369 template<
int codim >
377 if( item_->numvertices() == 3 )
380 switch (i) {
case 0: j=2;
break;
386 else if ( codim == 2 )
388 if( item_->numvertices() == 4 )
390 switch (i) {
case 0: j=0;
break;
397 return entity< codim >( j );
403 #if ALU2DGRID_PARALLEL
404 return grid().rankManager().partitionType( item_->getIndex() );
417 int subBoundaryId (
int i )
const;
430 LocalGeometry geometryInFather ()
const;
433 bool mightVanish ()
const
435 return ((item_->is(
ALU2DSPACE Refco::crs))==1);
440 return ((item_->wasRefined())==1);
451 bool mark(
int refCount)
const;
459 void setElement(
const HElementType &element,
int face=-1,
int level = -1)
const;
467 void reset (
int l );
489 const GridImp&
grid()
const {
return factory_.grid(); }
507 template<
int cc>
int getSubIndex (
int i)
const;
509 int subIndex (
int i,
unsigned int codim)
const;
515 mutable HElementType *item_;
518 mutable GeometryImpl geoObj_;
521 mutable bool isLeaf_;
535 template<
int codim,
class Gr
idImp >
541 static const int dim = GridImp::dimension;
542 static const int dimworld = GridImp::dimensionworld;
543 static const ALU2DSPACE ElementType eltype = GridImp::elementType;
553 typedef typename GridImp::template Codim<codimension>::Entity
Entity;
556 typedef typename GridImp::template Codim<codimension>::EntitySeed
EntitySeed;
565 const ElementType &item,
623 #include "entity_imp.cc"