1 #ifndef DUNE_INTERSECTIONITERATORWRAPPER_HH
2 #define DUNE_INTERSECTIONITERATORWRAPPER_HH
4 #include <dune/common/version.hh>
5 #if !DUNE_VERSION_NEWER( DUNE_GRID,2,5)
6 #include <dune/common/nullptr.hh>
9 #include <dune/grid/common/intersectioniterator.hh>
24 template <
class Gr
idImp,
class IntersectionIteratorImpl>
27 enum { dim = GridImp :: dimension };
28 enum { dimworld = GridImp :: dimensionworld };
32 typedef IntersectionIteratorImpl IntersectionIteratorImp;
41 typedef typename GridImp :: ctype
ctype;
44 typedef typename GridImp::template Codim<0>::Entity
Entity;
45 #if !DUNE_VERSION_NEWER(DUNE_GRID,2,5)
47 typedef typename GridImp::template Codim<0>::EntityPointer
EntityPointer;
51 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
53 typedef typename GridImp::template Codim<1>::LocalGeometry
LocalGeometry;
58 typedef typename IntersectionIteratorImpl::Twists
Twists;
59 typedef typename Twists::Twist
Twist;
64 template <
class EntityImp>
71 it().first( en, wLevel, grid );
74 operator bool ()
const {
return bool( itPtr_ ); }
79 return (itPtr_ && other.itPtr_ ) ?
it().equals( other.
it() ) : itPtr_ == other.itPtr_;
94 ALU3DSPACE SharedPointer< IntersectionIteratorImp > copy( itPtr_ );
129 return it().geometryInInside();
138 return it().geometry();
151 return it().indexInInside();
159 return it().geometryInOutside();
166 return it().indexInOutside();
179 return it().unitOuterNormal( local );
186 const auto& refElement = GridImp::faceReferenceElement();
187 assert( refElement.type() ==
type() );
195 return it().outerNormal( local );
202 return it().integrationOuterNormal( local );
212 IntersectionIteratorImp &
it() {
return *itPtr_; }
213 const IntersectionIteratorImp &
it()
const {
return *itPtr_; }
218 return it().weight();
222 mutable ALU3DSPACE SharedPointer< IntersectionIteratorImp > itPtr_;
225 template <
class Gr
idImp>
235 template <
class EntityImp>
251 template <
class Gr
idImp>
266 typedef typename GridImp :: ctype
ctype;
269 typedef typename GridImp::template Codim<0>::Entity
Entity;
270 #if !DUNE_VERSION_NEWER(DUNE_GRID,2,5)
276 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
287 template <
class EntityImp>
330 template <
class Gr
idImp>
340 template <
class EntityImp>
355 template <
class Gr
idImp>
369 typedef typename GridImp :: ctype
ctype;
372 typedef typename GridImp::template Codim<0>::Entity
Entity;
373 #if !DUNE_VERSION_NEWER(DUNE_GRID,2,5)
379 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
389 template <
class EntityImp>
#define ALU3DSPACE
Definition: alu3dinclude.hh:24
Definition: alu3dinclude.hh:80
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:26
const NormalType centerUnitOuterNormal() const
Definition: intersectioniteratorwrapper.hh:184
Geometry geometry() const
Definition: intersectioniteratorwrapper.hh:136
const NormalType outerNormal(const FieldVector< ctype, dim-1 > &local) const
Definition: intersectioniteratorwrapper.hh:193
GridImp ::ctype ctype
define type used for coordinates in grid module
Definition: intersectioniteratorwrapper.hh:41
size_t boundarySegmentIndex() const
return the boundary segment index
Definition: intersectioniteratorwrapper.hh:118
int weight() const
return weight associated with graph edge between the neighboring elements
Definition: intersectioniteratorwrapper.hh:216
bool boundary() const
Definition: intersectioniteratorwrapper.hh:109
Entity inside() const
access entity where iteration started
Definition: intersectioniteratorwrapper.hh:105
IntersectionIteratorImpl::Twists Twists
Definition: intersectioniteratorwrapper.hh:58
int segmentId() const
return the segment index (non-consecutive)
Definition: intersectioniteratorwrapper.hh:121
const IntersectionIteratorImp & it() const
Definition: intersectioniteratorwrapper.hh:213
void increment()
increment iterator
Definition: intersectioniteratorwrapper.hh:83
@ dimensionworld
Definition: intersectioniteratorwrapper.hh:38
IntersectionIteratorWrapper()
Definition: intersectioniteratorwrapper.hh:61
bool conforming() const
return true if intersection is conform (i.e. only one neighbor)
Definition: intersectioniteratorwrapper.hh:209
Entity outside() const
access neighbor
Definition: intersectioniteratorwrapper.hh:102
int boundaryId() const
return information about the Boundary
Definition: intersectioniteratorwrapper.hh:115
GridImp::template Codim< 0 >::Entity Entity
Entity type.
Definition: intersectioniteratorwrapper.hh:44
Twists::Twist Twist
Definition: intersectioniteratorwrapper.hh:59
IntersectionIteratorImp & it()
returns reference to underlying intersection iterator implementation
Definition: intersectioniteratorwrapper.hh:212
GeometryType type() const
obtain the type of reference element for this intersection
Definition: intersectioniteratorwrapper.hh:142
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
type of intersection*Local
Definition: intersectioniteratorwrapper.hh:53
const NormalType integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
Definition: intersectioniteratorwrapper.hh:200
IntersectionIteratorWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:65
LocalGeometry geometryInInside() const
Definition: intersectioniteratorwrapper.hh:127
int level() const
return level of iterator
Definition: intersectioniteratorwrapper.hh:206
@ dimension
Definition: intersectioniteratorwrapper.hh:36
FieldVector< ctype, dimworld > NormalType
type of normal vector
Definition: intersectioniteratorwrapper.hh:56
LocalGeometry geometryInOutside() const
Definition: intersectioniteratorwrapper.hh:157
GridImp::template Codim< 1 >::Geometry Geometry
type of intersectionGlobal
Definition: intersectioniteratorwrapper.hh:51
Twist twistInOutside() const
twist of the face seen from the outer element
Definition: intersectioniteratorwrapper.hh:173
Twist twistInInside() const
twist of the face seen from the inner element
Definition: intersectioniteratorwrapper.hh:170
int indexInInside() const
Definition: intersectioniteratorwrapper.hh:149
int indexInOutside() const
Definition: intersectioniteratorwrapper.hh:164
bool neighbor() const
return true if across the intersection a neighbor on this level exists
Definition: intersectioniteratorwrapper.hh:112
const NormalType unitOuterNormal(const FieldVector< ctype, dim-1 > &local) const
Definition: intersectioniteratorwrapper.hh:177
bool equals(const ThisType &other) const
the equality method
Definition: intersectioniteratorwrapper.hh:77
GridImp::template Codim< 0 >::EntityPointer EntityPointer
type of EntityPointer
Definition: intersectioniteratorwrapper.hh:47
Definition: intersectioniteratorwrapper.hh:228
LeafIntersectionWrapper(const ThisType &org)
The copy constructor.
Definition: intersectioniteratorwrapper.hh:242
LeafIntersectionWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:236
LeafIntersectionWrapper()
Definition: intersectioniteratorwrapper.hh:232
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:253
bool equals(const ThisType &i) const
the equality method
Definition: intersectioniteratorwrapper.hh:311
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
type of intersection*Local
Definition: intersectioniteratorwrapper.hh:278
GridImp::template Codim< 0 >::Entity Entity
Entity type.
Definition: intersectioniteratorwrapper.hh:269
Intersection intersection_
Definition: intersectioniteratorwrapper.hh:320
const IntersectionImp & impl() const
Definition: intersectioniteratorwrapper.hh:325
LeafIntersectionIteratorWrapper(const ThisType &org)
The copy constructor.
Definition: intersectioniteratorwrapper.hh:293
GridImp::template Codim< 0 >::EntityPointer EntityPointer
type of EntityPointer
Definition: intersectioniteratorwrapper.hh:272
Dune::Intersection< GridImp, IntersectionImp > Intersection
Definition: intersectioniteratorwrapper.hh:258
GridImp ::ctype ctype
define type used for coordinates in grid module
Definition: intersectioniteratorwrapper.hh:266
@ dimension
Definition: intersectioniteratorwrapper.hh:261
LeafIntersectionIteratorWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:288
void increment()
increment iterator
Definition: intersectioniteratorwrapper.hh:314
GridImp::template Codim< 1 >::Geometry Geometry
type of intersectionGlobal
Definition: intersectioniteratorwrapper.hh:276
LeafIntersectionIteratorWrapper()
default constructor
Definition: intersectioniteratorwrapper.hh:284
IntersectionImp & impl()
Definition: intersectioniteratorwrapper.hh:323
@ dimensionworld
Definition: intersectioniteratorwrapper.hh:263
const Intersection & dereference() const
return reference to intersection
Definition: intersectioniteratorwrapper.hh:305
ThisType & operator=(const ThisType &org)
the f*cking assignment operator
Definition: intersectioniteratorwrapper.hh:298
FieldVector< ctype, dimensionworld > NormalType
type of normal vector
Definition: intersectioniteratorwrapper.hh:281
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:333
LevelIntersectionWrapper()
Definition: intersectioniteratorwrapper.hh:337
LevelIntersectionWrapper(const ThisType &org)
The copy constructor.
Definition: intersectioniteratorwrapper.hh:347
LevelIntersectionWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:341
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:357
@ dimension
Definition: intersectioniteratorwrapper.hh:364
IntersectionImp & impl()
Definition: intersectioniteratorwrapper.hh:427
Intersection intersection_
Definition: intersectioniteratorwrapper.hh:424
GridImp::template Codim< 0 >::Entity Entity
Entity type.
Definition: intersectioniteratorwrapper.hh:372
LevelIntersectionIteratorWrapper()
Definition: intersectioniteratorwrapper.hh:386
bool equals(const ThisType &i) const
the equality method
Definition: intersectioniteratorwrapper.hh:413
GridImp::template Codim< 1 >::Geometry Geometry
type of intersectionGlobal
Definition: intersectioniteratorwrapper.hh:379
FieldVector< ctype, dimensionworld > NormalType
type of normal vector
Definition: intersectioniteratorwrapper.hh:384
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
type of intersection*Local
Definition: intersectioniteratorwrapper.hh:381
const IntersectionImp & impl() const
Definition: intersectioniteratorwrapper.hh:429
void increment()
increment iterator
Definition: intersectioniteratorwrapper.hh:416
GridImp ::ctype ctype
define type used for coordinates in grid module
Definition: intersectioniteratorwrapper.hh:369
const Intersection & dereference() const
return reference to intersection
Definition: intersectioniteratorwrapper.hh:407
@ dimensionworld
Definition: intersectioniteratorwrapper.hh:366
LevelIntersectionIteratorWrapper(const ThisType &org)
The copy constructor.
Definition: intersectioniteratorwrapper.hh:395
GridImp::template Codim< 0 >::EntityPointer EntityPointer
type of EntityPointer
Definition: intersectioniteratorwrapper.hh:375
LevelIntersectionIteratorWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:390
Dune::Intersection< GridImp, IntersectionImp > Intersection
Definition: intersectioniteratorwrapper.hh:361
ThisType & operator=(const ThisType &org)
the f*cking assignment operator
Definition: intersectioniteratorwrapper.hh:400