3 #ifndef DUNE_ALU2DGRIDENTITY_HH
4 #define DUNE_ALU2DGRIDENTITY_HH
19 template<
int cd,
int dim,
class Gr
idImp>
20 class ALU2dGridEntity;
21 template<
int cd, PartitionIteratorType pitype,
class Gr
idImp >
22 class ALU2dGridLevelIterator;
23 template<
int codim,
class Gr
idImp >
24 class ALU2dGridEntityPointer;
25 template<
int mydim,
int coorddim,
class Gr
idImp>
26 class ALU2dGridGeometry;
27 template<
class Gr
idImp>
28 class ALU2dGridHierarchicIterator;
29 template<
class Gr
idImp>
30 class ALU2dGridLevelIntersectionIterator;
31 template<
class Gr
idImp>
32 class ALU2dGridLeafIntersectionIterator;
33 template<
class Gr
idImp>
34 class ALU2dGridIntersectionIterator;
35 template<
int codim, PartitionIteratorType,
class Gr
idImp>
36 class ALU2dGridLeafIterator;
37 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
52 template<
int cd,
int dim,
class Gr
idImp>
60 friend class ALU2dGridIntersectionIterator < GridImp >;
61 friend class ALU2dGridIntersectionIterator < const GridImp >;
74 friend class ALU2dGridMakeableEntity<0,dim,GridImp>;
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;
152 const GridImp&
grid()
const {
return factory_.grid(); }
184 mutable GeometryImpl geoObj_;
209 template<
int dim,
class Gr
idImp>
217 friend class ALU2dGridIntersectionIterator < GridImp >;
218 friend class ALU2dGridIntersectionIterator < const GridImp >;
231 friend class ALU2dGridMakeableEntity<0,dim,GridImp>;
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();
310 DUNE_DEPRECATED_MSG("Use ileafbegin() instead.")
317 DUNE_DEPRECATED_MSG("Use ileafend() instead.")
340 bool isLeaf ()
const;
347 bool hasFather ()
const
349 return (this->
level()>0);
370 typename Codim<cc>::EntityPointer entity (
int i)
const;
374 template<
int codim >
382 if( item_->numvertices() == 3 )
385 switch (i) {
case 0 : j=2;
break;
390 else if ( codim == 2 )
392 if( item_->numvertices() == 4 )
394 switch (i) {
case 0 : j=0;
break;
400 return entity< codim >( j );
406 #if ALU2DGRID_PARALLEL
407 return grid().rankManager().partitionType( item_->getIndex() );
420 int subBoundaryId (
int i )
const;
433 LocalGeometry geometryInFather ()
const;
436 bool mightVanish ()
const
438 return ((item_->is(
ALU2DSPACE Refco::crs))==1);
443 return ((item_->wasRefined())==1);
454 bool mark(
int refCount)
const;
462 void setElement(
const HElementType &element,
int face=-1,
int level = -1)
const;
470 void reset (
int l );
492 const GridImp&
grid()
const {
return factory_.grid(); }
510 template<
int cc>
int getSubIndex (
int i)
const;
512 int subIndex (
int i,
unsigned int codim)
const;
518 mutable HElementType *item_;
521 mutable GeometryImpl geoObj_;
524 mutable bool isLeaf_;
538 template<
int codim,
class Gr
idImp >
544 static const int dim = GridImp::dimension;
545 static const int dimworld = GridImp::dimensionworld;
546 static const ALU2DSPACE ElementType eltype = GridImp::elementType;
556 typedef typename GridImp::template Codim<codimension>::Entity
Entity;
559 typedef typename GridImp::template Codim<codimension>::EntitySeed
EntitySeed;
568 const ElementType &item,
626 #include "entity_imp.cc"