Go to the documentation of this file. 1 #ifndef DUNE_INTERSECTIONITERATORWRAPPER_HH
2 #define DUNE_INTERSECTIONITERATORWRAPPER_HH
4 #include <dune/common/version.hh>
5 #if !DUNE_VERSION_NEWER( DUNE_GRID, 3, 0 )
6 #include <dune/common/nullptr.hh>
7 #endif //#if !DUNE_VERSION_NEWER( DUNE_GRID, 3, 0 )
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;
42 typedef typename GridImp :: ctype
ctype;
45 typedef typename GridImp::template Codim<0>::Entity
Entity;
46 #if !DUNE_VERSION_NEWER(DUNE_GRID,3,0)
47 typedef typename GridImp::template Codim<0>::EntityPointer
EntityPointer;
49 #endif // #if !DUNE_VERSION_NEWER(DUNE_GRID,3,0)
52 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
54 typedef typename GridImp::template Codim<1>::LocalGeometry
LocalGeometry;
59 typedef typename IntersectionIteratorImpl::Twists
Twists;
60 typedef typename Twists::Twist
Twist;
65 template <
class EntityImp>
72 it().first( en, wLevel, grid.conformingRefinement(), grid.ghostCellsEnabled() );
75 operator bool ()
const {
return bool( itPtr_ ); }
80 return (itPtr_ && other.itPtr_ ) ?
it().equals( other.
it() ) : itPtr_ == other.itPtr_;
95 ALU3DSPACE SharedPointer< IntersectionIteratorImp > copy( itPtr_ );
127 return it().geometryInInside();
136 return it().geometry();
149 return it().indexInInside();
157 return it().geometryInOutside();
164 return it().indexInOutside();
177 return it().unitOuterNormal( local );
184 const ReferenceElement<
ctype, dim-1> & refElement =
185 ReferenceElements<ctype, dim-1>::general(
type() );
193 return it().outerNormal( local );
200 return it().integrationOuterNormal( local );
210 IntersectionIteratorImp &
it() {
return *itPtr_; }
211 const IntersectionIteratorImp &
it()
const {
return *itPtr_; }
216 return it().weight();
220 mutable ALU3DSPACE SharedPointer< IntersectionIteratorImp > itPtr_;
223 template <
class Gr
idImp>
233 template <
class EntityImp>
249 template <
class Gr
idImp>
264 typedef typename GridImp :: ctype
ctype;
267 typedef typename GridImp::template Codim<0>::Entity
Entity;
268 #if !DUNE_VERSION_NEWER(DUNE_GRID,3,0)
269 typedef typename GridImp::template Codim<0>::EntityPointer
EntityPointer;
271 #endif // #if !DUNE_VERSION_NEWER(DUNE_GRID,3,0)
274 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
285 template <
class EntityImp>
328 template <
class Gr
idImp>
338 template <
class EntityImp>
353 template <
class Gr
idImp>
367 typedef typename GridImp :: ctype
ctype;
370 typedef typename GridImp::template Codim<0>::Entity
Entity;
371 #if !DUNE_VERSION_NEWER(DUNE_GRID,3,0)
372 typedef typename GridImp::template Codim<0>::EntityPointer
EntityPointer;
374 #endif // #if !DUNE_VERSION_NEWER(DUNE_GRID,3,0)
377 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
387 template <
class EntityImp>
bool neighbor() const
return true if across the intersection a neighbor on this level exists
Definition: intersectioniteratorwrapper.hh:113
GridImp::template Codim< 1 >::Geometry Geometry
type of intersectionGlobal
Definition: intersectioniteratorwrapper.hh:377
int level() const
return level of iterator
Definition: intersectioniteratorwrapper.hh:204
FieldVector< ctype, dimensionworld > NormalType
type of normal vector
Definition: intersectioniteratorwrapper.hh:279
Definition: intersectioniteratorwrapper.hh:39
LevelIntersectionIteratorWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:388
size_t boundarySegmentIndex() const
return the boundary segment index
Definition: intersectioniteratorwrapper.hh:119
const Intersection & dereference() const
return reference to intersection
Definition: intersectioniteratorwrapper.hh:303
GridImp ::ctype ctype
define type used for coordinates in grid module
Definition: intersectioniteratorwrapper.hh:42
Entity inside() const
access entity where iteration started
Definition: intersectioniteratorwrapper.hh:106
Twists::Twist Twist
Definition: intersectioniteratorwrapper.hh:60
LeafIntersectionWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:234
LevelIntersectionIteratorWrapper()
Definition: intersectioniteratorwrapper.hh:384
Intersection intersection_
Definition: intersectioniteratorwrapper.hh:318
LeafIntersectionWrapper()
Definition: intersectioniteratorwrapper.hh:230
const IntersectionImp & impl() const
Definition: intersectioniteratorwrapper.hh:323
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:329
GridImp::template Codim< 1 >::Geometry Geometry
type of intersectionGlobal
Definition: intersectioniteratorwrapper.hh:274
int weight() const
return weight associated with graph edge between the neighboring elements
Definition: intersectioniteratorwrapper.hh:214
Twist twistInOutside() const
twist of the face seen from the outer element
Definition: intersectioniteratorwrapper.hh:171
const NormalType outerNormal(const FieldVector< ctype, dim-1 > &local) const
Definition: intersectioniteratorwrapper.hh:191
Definition: 3d/grid.hh:82
Definition: intersectioniteratorwrapper.hh:224
GridImp ::ctype ctype
define type used for coordinates in grid module
Definition: intersectioniteratorwrapper.hh:367
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
type of intersection*Local
Definition: intersectioniteratorwrapper.hh:276
IntersectionIteratorImpl::Twists Twists
Definition: intersectioniteratorwrapper.hh:59
GridImp::template Codim< 0 >::Entity Entity
Entity type.
Definition: intersectioniteratorwrapper.hh:370
bool boundary() const
Definition: intersectioniteratorwrapper.hh:110
const IntersectionIteratorImp & it() const
Definition: intersectioniteratorwrapper.hh:211
bool equals(const ThisType &i) const
the equality method
Definition: intersectioniteratorwrapper.hh:411
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:25
LeafIntersectionIteratorWrapper(const ThisType &org)
The copy constructor.
Definition: intersectioniteratorwrapper.hh:291
GridImp::template Codim< 0 >::EntityPointer EntityPointer
type of EntityPointer
Definition: intersectioniteratorwrapper.hh:270
Definition: intersectioniteratorwrapper.hh:261
const NormalType integrationOuterNormal(const FieldVector< ctype, dim-1 > &local) const
Definition: intersectioniteratorwrapper.hh:198
GridImp::template Codim< 0 >::EntityPointer EntityPointer
type of EntityPointer
Definition: intersectioniteratorwrapper.hh:373
ThisType & operator=(const ThisType &org)
the f*cking assignment operator
Definition: intersectioniteratorwrapper.hh:398
GridImp::template Codim< 0 >::Entity Entity
Entity type.
Definition: intersectioniteratorwrapper.hh:45
Intersection intersection_
Definition: intersectioniteratorwrapper.hh:422
bool equals(const ThisType &other) const
the equality method
Definition: intersectioniteratorwrapper.hh:78
Geometry geometry() const
Definition: intersectioniteratorwrapper.hh:134
bool equals(const ThisType &i) const
the equality method
Definition: intersectioniteratorwrapper.hh:309
FieldVector< ctype, dimworld > NormalType
type of normal vector
Definition: intersectioniteratorwrapper.hh:57
LevelIntersectionIteratorWrapper(const ThisType &org)
The copy constructor.
Definition: intersectioniteratorwrapper.hh:393
void increment()
increment iterator
Definition: intersectioniteratorwrapper.hh:84
void increment()
increment iterator
Definition: intersectioniteratorwrapper.hh:414
GridImp ::ctype ctype
define type used for coordinates in grid module
Definition: intersectioniteratorwrapper.hh:264
Definition: intersectioniteratorwrapper.hh:362
LevelIntersectionWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:339
int indexInInside() const
Definition: intersectioniteratorwrapper.hh:147
Definition: intersectioniteratorwrapper.hh:259
Dune::Intersection< GridImp, IntersectionImp > Intersection
Definition: intersectioniteratorwrapper.hh:256
Dune::Intersection< GridImp, IntersectionImp > Intersection
Definition: intersectioniteratorwrapper.hh:359
const IntersectionImp & impl() const
Definition: intersectioniteratorwrapper.hh:427
int boundaryId() const
return information about the Boundary
Definition: intersectioniteratorwrapper.hh:116
#define ALU3DSPACE
Definition: alu3dinclude.hh:24
int indexInOutside() const
Definition: intersectioniteratorwrapper.hh:162
LeafIntersectionWrapper(const ThisType &org)
The copy constructor.
Definition: intersectioniteratorwrapper.hh:240
GridImp::template Codim< 1 >::Geometry Geometry
type of intersectionGlobal
Definition: intersectioniteratorwrapper.hh:52
Definition: intersectioniteratorwrapper.hh:37
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:250
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
type of intersection*Local
Definition: intersectioniteratorwrapper.hh:54
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
type of intersection*Local
Definition: intersectioniteratorwrapper.hh:379
Definition: intersectioniteratorwrapper.hh:364
const NormalType unitOuterNormal(const FieldVector< ctype, dim-1 > &local) const
Definition: intersectioniteratorwrapper.hh:175
const NormalType centerUnitOuterNormal() const
Definition: intersectioniteratorwrapper.hh:182
void increment()
increment iterator
Definition: intersectioniteratorwrapper.hh:312
LeafIntersectionIteratorWrapper()
default constructor
Definition: intersectioniteratorwrapper.hh:282
IntersectionIteratorWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:66
bool conforming() const
return true if intersection is conform (i.e. only one neighbor)
Definition: intersectioniteratorwrapper.hh:207
IntersectionImp & impl()
Definition: intersectioniteratorwrapper.hh:321
Class that wraps IntersectionIteratorImp of a grid and gets it's internal object from a object stack ...
Definition: intersectioniteratorwrapper.hh:354
LeafIntersectionIteratorWrapper(const GridImp &grid, const EntityImp &en, int wLevel, bool end)
constructor called from the ibegin and iend method
Definition: intersectioniteratorwrapper.hh:286
IntersectionIteratorImp & it()
returns reference to underlying intersection iterator implementation
Definition: intersectioniteratorwrapper.hh:210
GridImp::template Codim< 0 >::Entity Entity
Entity type.
Definition: intersectioniteratorwrapper.hh:267
GridImp::template Codim< 0 >::EntityPointer EntityPointer
type of EntityPointer
Definition: intersectioniteratorwrapper.hh:48
LevelIntersectionWrapper(const ThisType &org)
The copy constructor.
Definition: intersectioniteratorwrapper.hh:345
ThisType & operator=(const ThisType &org)
the f*cking assignment operator
Definition: intersectioniteratorwrapper.hh:296
Twist twistInInside() const
twist of the face seen from the inner element
Definition: intersectioniteratorwrapper.hh:168
IntersectionIteratorWrapper()
Definition: intersectioniteratorwrapper.hh:62
IntersectionImp & impl()
Definition: intersectioniteratorwrapper.hh:425
FieldVector< ctype, dimensionworld > NormalType
type of normal vector
Definition: intersectioniteratorwrapper.hh:382
LevelIntersectionWrapper()
Definition: intersectioniteratorwrapper.hh:335
const Intersection & dereference() const
return reference to intersection
Definition: intersectioniteratorwrapper.hh:405
Definition: alu3dinclude.hh:79
GeometryType type() const
obtain the type of reference element for this intersection
Definition: intersectioniteratorwrapper.hh:140
LocalGeometry geometryInOutside() const
Definition: intersectioniteratorwrapper.hh:155
LocalGeometry geometryInInside() const
Definition: intersectioniteratorwrapper.hh:125
Entity outside() const
access neighbor
Definition: intersectioniteratorwrapper.hh:103