3 #ifndef DUNE_ALU2DGRID_INTERSECTION_HH
4 #define DUNE_ALU2DGRID_INTERSECTION_HH
21 template<
int cd,
int dim,
class Gr
idImp>
22 class ALU2dGridEntity;
23 template<
int cd, PartitionIteratorType pitype,
class Gr
idImp >
24 class ALU2dGridLevelIterator;
25 template<
int cd,
class Gr
idImp >
26 class ALU2dGridEntityPointer;
27 template<
int mydim,
int coorddim,
class Gr
idImp>
28 class ALU2dGridGeometry;
29 template<
class Gr
idImp>
30 class ALU2dGridHierarchicIterator;
31 template<
class Gr
idImp>
32 class ALU2dGridIntersectionBase;
33 template<
class Gr
idImp>
34 class ALU2dGridLeafIntersectionIterator;
35 template<
class Gr
idImp>
36 class ALU2dGridLevelIntersectionIterator;
37 template<
int codim, PartitionIteratorType pitype,
class Gr
idImp>
38 class ALU2dGridLeafIterator;
39 template<
int dim,
int dimworld, ALU2DSPACE ElementType eltype >
47 template<
class Gr
idImp,
class LocalGeometryImpl >
53 LocalGeometryImpl geoms_[ 2 ][ 4 ][ 2 ];
55 #ifdef USE_SMP_PARALLEL
63 const LocalGeometryImpl &
localGeom (
const int aluFace,
const int twist,
const int corners )
const
65 assert( corners == 3 || corners == 4 );
66 assert( 0 <= aluFace && aluFace < corners );
67 assert( twist == 0 || twist == 1 );
68 return geoms_[ corners-3 ][ aluFace ][ twist ];
74 #ifdef USE_SMP_PARALLEL
76 static std::vector< ThisType > storage( GridObjectFactoryType :: maxThreads() );
77 return storage[ GridObjectFactoryType :: threadNumber () ];
100 template<
class Gr
idImp>
107 typedef typename GridImp::Traits::template Codim< 1 >::GeometryImpl GeometryImpl;
108 typedef typename GridImp::Traits::template Codim< 1 >::LocalGeometryImpl LocalGeometryImpl;
120 typedef typename GridImp::template Codim<0>::Entity
Entity;
123 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
167 return inside()->neighbour(
index_ )->thinis( ThinelementType::bndel_like );
189 nFaces_ = (inside != 0 ? inside->numfaces() : 0);
224 return reinterpret_cast< const Intersection &
>( *this );
323 template<
class Gr
idImp >
343 typedef std::pair< HElementType *, int > IntersectionInfo;
352 typedef typename GridImp::template Codim<0>::Entity
Entity;
354 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
396 void setFirstItem(
const HElementType & elem,
int wLevel);
399 template <
class EntityType>
400 void first(
const EntityType & en,
int wLevel);
402 void addNeighboursToStack();
404 static int getOppositeInFather (
int nrInChild,
int nrOfChild );
405 static int getOppositeInChild (
int nrInFather,
int nrOfChild );
407 void setupIntersection ();
416 mutable std::stack<IntersectionInfo> nbStack_;
428 template<
class Gr
idImp >
455 typedef std::pair< HElementType *, int > IntersectionInfo;
458 typedef typename GridImp::template Codim<0>::Entity
Entity;
459 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
499 void setFirstItem(
const HElementType & elem,
int wLevel);
502 template <
class EntityType>
503 void first(
const EntityType & en,
int wLevel);
505 void setupIntersection ();
514 std::stack<IntersectionInfo> nbStack_;
521 #if COMPILE_ALU2DGRID_INLINE
522 #include "intersection.cc"
525 #endif // #ifndef DUNE_ALU2DGRID_INTERSECTION_HH