6#ifndef DUNE_GRID_COMMON_INTERSECTION_HH
7#define DUNE_GRID_COMMON_INTERSECTION_HH
162 template<
class Gr
idImp,
class IntersectionImp >
192 typedef typename GridImp::template Codim<0>::Entity
Entity;
195 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
213 typedef typename GridImp::ctype
ctype;
218 return this->real.boundary();
238 return this->real.boundarySegmentIndex();
244 return this->real.neighbor();
252 return this->real.inside();
263 return this->real.outside();
270 return this->real.conforming();
288 return this->real.geometryInInside();
306 return this->real.geometryInOutside();
325 return this->real.geometry();
331 return this->real.type();
348 return this->real.indexInInside();
365 return this->real.indexInOutside();
374 return this->real.outerNormal(local);
387 return this->real.integrationOuterNormal(local);
397 return this->real.unitOuterNormal(local);
408 return this->real.centerUnitOuterNormal();
447 real = std::move(other.real);
482 template<
class Gr
idImp,
class IntersectionImp >
485 constexpr static int dim = GridImp::dimension;
486 constexpr static int dimworld = GridImp::dimensionworld;
487 typedef typename GridImp::ctype ct;
495 FieldVector<ct, dimworld> n = asImp().unitOuterNormal(local);
496 n *= asImp().geometry().integrationElement(local);
503 FieldVector<ct, dimworld> n = asImp().outerNormal(local);
514 return asImp().unitOuterNormal(refElement.position(0,0));
522 IntersectionImp &asImp () {
return static_cast< IntersectionImp &
>( *this ); }
523 const IntersectionImp &asImp ()
const {
return static_cast< const IntersectionImp &
>( *this ); }
Include standard header files.
Definition: agrid.hh:60
auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
Definition: common/geometry.hh:558
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: common/intersection.hh:164
Intersection & operator=(const Intersection &other)
Copy assignment operator from an existing intersection.
Definition: common/intersection.hh:438
Geometry geometry() const
geometrical information about the intersection in global coordinates.
Definition: common/intersection.hh:323
bool conforming() const
Return true if intersection is conforming.
Definition: common/intersection.hh:268
Entity outside() const
return Entity on the outside of this intersection. That is the neighboring Entity.
Definition: common/intersection.hh:261
int indexInOutside() const
Local index of codim 1 entity in outside() entity where intersection is contained in.
Definition: common/intersection.hh:363
static constexpr int mydimension
dimension of the intersection
Definition: common/intersection.hh:207
bool neighbor() const
return true if intersection is shared with another element.
Definition: common/intersection.hh:242
bool boundary() const
Return true if intersection is with interior or exterior boundary (see the cases above)
Definition: common/intersection.hh:216
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in.
Definition: common/intersection.hh:346
Intersection(Implementation &&impl)
Definition: common/intersection.hh:463
Intersection & operator=(Intersection &&other)
Move assignment operator from an existing intersection.
Definition: common/intersection.hh:445
Geometry::GlobalCoordinate GlobalCoordinate
Type for normal vectors.
Definition: common/intersection.hh:201
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Codim 1 geometry returned by geometryInInside() and geometryInOutside()
Definition: common/intersection.hh:204
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:395
bool operator!=(const Intersection &other) const
Compares two intersections for inequality.
Definition: common/intersection.hh:418
GeometryType type() const
obtain the type of reference element for this intersection
Definition: common/intersection.hh:329
Intersection(Intersection &&other)
Move constructor from an existing intersection.
Definition: common/intersection.hh:433
LocalGeometry geometryInOutside() const
geometrical information about this intersection in local coordinates of the outside() entity.
Definition: common/intersection.hh:304
LocalGeometry geometryInInside() const
geometrical information about this intersection in local coordinates of the inside() entity.
Definition: common/intersection.hh:286
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition: common/intersection.hh:236
static constexpr int dimensionworld
dimension of world
Definition: common/intersection.hh:210
Entity inside() const
return Entity on the inside of this intersection. That is the Entity where we started this.
Definition: common/intersection.hh:250
Geometry::LocalCoordinate LocalCoordinate
Type for vectors of coordinates on the intersection.
Definition: common/intersection.hh:198
Implementation real
Definition: common/intersection.hh:188
GlobalCoordinate centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:406
GridImp::template Codim< 1 >::Geometry Geometry
Codim 1 geometry returned by geometry()
Definition: common/intersection.hh:195
Implementation & impl()
access to the underlying implementation
Definition: common/intersection.hh:178
GridImp::template Codim< 0 >::Entity Entity
Type of entity that this Intersection belongs to.
Definition: common/intersection.hh:192
const Implementation & impl() const
access to the underlying implementation
Definition: common/intersection.hh:185
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition: common/intersection.hh:372
Intersection()
Default constructor.
Definition: common/intersection.hh:424
GridImp::ctype ctype
Type of individual coefficients of coordinate vectors.
Definition: common/intersection.hh:213
Intersection(const Implementation &impl)
Definition: common/intersection.hh:458
IntersectionImp Implementation
type of underlying implementation
Definition: common/intersection.hh:171
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
return unit outer normal scaled with the integration element
Definition: common/intersection.hh:385
bool operator==(const Intersection &other) const
Compares two intersections for equality.
Definition: common/intersection.hh:412
Intersection(const Intersection &other)
Copy constructor from an existing intersection.
Definition: common/intersection.hh:428
FieldVector< ctype, cdim > GlobalCoordinate
type of the global coordinates
Definition: common/geometry.hh:106
FieldVector< ctype, mydim > LocalCoordinate
type of local coordinates
Definition: common/geometry.hh:103
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/intersectioniterator.hh:83
Default Implementations of integrationOuterNormal and unitOuterNormal for IntersectionImp.
Definition: common/intersection.hh:484
FieldVector< ct, dimworld > integrationOuterNormal(const FieldVector< ct, dim-1 > &local) const
Definition: common/intersection.hh:493
FieldVector< ct, dimworld > unitOuterNormal(const FieldVector< ct, dim-1 > &local) const
return unit outer normal
Definition: common/intersection.hh:501
FieldVector< ct, dimworld > centerUnitOuterNormal() const
return unit outer normal at center of intersection geometry
Definition: common/intersection.hh:509
Different resources needed by all grid implementations.