1 #ifndef DUNE_ALU2DGRID_INTERSECTION_HH
2 #define DUNE_ALU2DGRID_INTERSECTION_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 cd,
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 ALU2dGridIntersectionBase;
31 template<
class Gr
idImp>
32 class ALU2dGridLeafIntersectionIterator;
33 template<
class Gr
idImp>
34 class ALU2dGridLevelIntersectionIterator;
35 template<
int codim, PartitionIteratorType pitype,
class Gr
idImp>
36 class ALU2dGridLeafIterator;
37 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
45 template<
class LocalGeometryImpl >
51 LocalGeometryImpl geoms_[ 2 ][ 4 ][ 2 ];
59 const LocalGeometryImpl &
localGeom (
const int aluFace,
const int twist,
const int corners )
const
61 assert( corners == 3 || corners == 4 );
62 assert( 0 <= aluFace && aluFace < corners );
63 assert( twist == 0 || twist == 1 );
64 return geoms_[ corners-3 ][ aluFace ][ twist ];
90 template<
class Gr
idImp>
97 typedef typename GridImp::Traits::template Codim< 1 >::GeometryImpl GeometryImpl;
98 typedef typename GridImp::Traits::template Codim< 1 >::LocalGeometryImpl LocalGeometryImpl;
110 typedef typename GridImp::template Codim<0>::Entity
Entity;
113 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
157 return inside()->neighbour(
index_ )->thinis( ThinelementType::bndel_like );
179 nFaces_ = (inside != 0 ? inside->numfaces() : 0);
214 return reinterpret_cast< const Intersection &
>( *this );
308 template<
class Gr
idImp >
328 typedef std::pair< HElementType *, int > IntersectionInfo;
337 typedef typename GridImp::template Codim<0>::Entity
Entity;
339 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
381 void setFirstItem(
const HElementType & elem,
int wLevel);
384 template <
class EntityType>
385 void first(
const EntityType & en,
int wLevel);
387 void addNeighboursToStack();
389 static int getOppositeInFather (
int nrInChild,
int nrOfChild );
390 static int getOppositeInChild (
int nrInFather,
int nrOfChild );
392 void setupIntersection ();
401 mutable std::stack<IntersectionInfo> nbStack_;
413 template<
class Gr
idImp >
440 typedef std::pair< HElementType *, int > IntersectionInfo;
443 typedef typename GridImp::template Codim<0>::Entity
Entity;
444 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
484 void setFirstItem(
const HElementType & elem,
int wLevel);
487 template <
class EntityType>
488 void first(
const EntityType & en,
int wLevel);
490 void setupIntersection ();
499 std::stack<IntersectionInfo> nbStack_;
506 #if COMPILE_ALU2DGRID_INLINE
507 #include "intersection.cc"
510 #endif // #ifndef DUNE_ALU2DGRID_INTERSECTION_HH