6 #ifndef DUNE_GRID_COMMON_INTERSECTION_HH 7 #define DUNE_GRID_COMMON_INTERSECTION_HH 162 template<
class Gr
idImp,
class IntersectionImp >
213 typedef typename GridImp::ctype
ctype;
252 return this->real.
inside();
336 return this->real.
type();
419 return real.equals(other.real);
425 return !
real.equals(other.real);
452 real = std::move(other.real);
487 template<
class Gr
idImp,
class IntersectionImp >
490 constexpr
static int dim = GridImp::dimension;
491 constexpr
static int dimworld = GridImp::dimensionworld;
492 typedef typename GridImp::ctype ct;
500 FieldVector<ct, dimworld> n = asImp().unitOuterNormal(local);
501 n *= asImp().geometry().integrationElement(local);
508 FieldVector<ct, dimworld> n = asImp().outerNormal(local);
519 return asImp().unitOuterNormal(refElement.position(0,0));
527 IntersectionImp &asImp () {
return static_cast< IntersectionImp &
>( *this ); }
528 const IntersectionImp &asImp ()
const {
return static_cast< const IntersectionImp &
>( *this ); }
533 #endif // DUNE_GRID_COMMON_INTERSECTION_HH static constexpr int mydimension
dimension of the intersection
Definition: common/intersection.hh:207
Implementation real
Definition: common/intersection.hh:188
const Implementation & impl() const
access to the underlying implementation
Definition: common/intersection.hh:185
concept Entity
Model of a grid entity.
Definition: concepts/entity.hh:119
bool neighbor() const
Definition: intersection.cc:382
GridImp::template Codim< 0 >::Entity Entity
Type of entity that this Intersection belongs to.
Definition: common/intersection.hh:192
static constexpr int dimensionworld
dimension of world
Definition: common/intersection.hh:210
GridImp::template Codim< 0 >::Entity outside() const
Definition: intersection.cc:365
FieldVector< ctype, mydim > LocalCoordinate
type of local coordinates
Definition: common/geometry.hh:103
size_t boundarySegmentIndex() const
Definition: intersection.cc:64
bool boundary() const
Return true if intersection is with interior or exterior boundary (see the cases above) ...
Definition: common/intersection.hh:216
Entity inside() const
return Entity on the inside of this intersection. That is the Entity where we started this...
Definition: common/intersection.hh:250
NormalVector integrationOuterNormal([[maybe_unused]] const LocalCoordType &local) const
Definition: intersection.cc:189
bool boundary() const
Definition: intersection.cc:43
FieldVector< ct, dimworld > centerUnitOuterNormal() const
return unit outer normal at center of intersection geometry
Definition: common/intersection.hh:514
int indexInInside() const
Definition: intersection.cc:74
GeometryType type() const
Definition: intersection.cc:82
Geometry::LocalCoordinate LocalCoordinate
Type for vectors of coordinates on the intersection.
Definition: common/intersection.hh:198
concept Intersection
Model of an intersection.
Definition: concepts/intersection.hh:23
concept Geometry
Model of a geometry object.
Definition: concepts/geometry.hh:29
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition: common/intersection.hh:377
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition: common/intersection.hh:236
IntersectionImp Implementation
type of underlying implementation
Definition: common/intersection.hh:171
int indexInOutside() const
Local index of codim 1 entity in outside() entity where intersection is contained in...
Definition: common/intersection.hh:368
LocalGeometry geometryInInside() const
Definition: intersection.cc:391
Different resources needed by all grid implementations.
FieldVector< ct, dimworld > unitOuterNormal(const FieldVector< ct, dim-1 > &local) const
return unit outer normal
Definition: common/intersection.hh:506
GlobalCoordinate centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:411
Intersection()
Default constructor.
Definition: common/intersection.hh:429
Intersection & operator=(const Intersection &other)
Copy assignment operator from an existing intersection.
Definition: common/intersection.hh:443
bool operator==(const Intersection &other) const
Compares two intersections for equality.
Definition: common/intersection.hh:417
bool operator!=(const Intersection &other) const
Compares two intersections for inequality.
Definition: common/intersection.hh:423
Geometry::GlobalCoordinate GlobalCoordinate
Type for normal vectors.
Definition: common/intersection.hh:201
Entity outside() const
return Entity on the outside of this intersection. That is the neighboring Entity.
Definition: common/intersection.hh:261
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
return unit outer normal scaled with the integration element
Definition: common/intersection.hh:390
bool neighbor() const
return true if intersection is shared with another element.
Definition: common/intersection.hh:242
Intersection(Implementation &&impl)
Definition: common/intersection.hh:468
NormalVector centerUnitOuterNormal() const
Definition: intersection.cc:179
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:400
Intersection(const Implementation &impl)
Definition: common/intersection.hh:463
auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
Definition: common/geometry.hh:558
Include standard header files.
Definition: agrid.hh:59
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Codim 1 geometry returned by geometryInInside() and geometryInOutside()
Definition: common/intersection.hh:204
Entity inside() const
Definition: intersection.cc:35
GridImp::ctype ctype
Type of individual coefficients of coordinate vectors.
Definition: common/intersection.hh:213
GeometryType type() const
obtain the type of reference element for this intersection
Definition: common/intersection.hh:334
Geometry geometry() const
geometrical information about the intersection in global coordinates.
Definition: common/intersection.hh:328
LocalGeometry geometryInOutside() const
geometrical information about this intersection in local coordinates of the outside() entity...
Definition: common/intersection.hh:309
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:347
LocalGeometry geometryInOutside() const
Definition: intersection.cc:402
NormalVector outerNormal([[maybe_unused]] const LocalCoordType &local) const
Definition: intersection.cc:197
bool conforming() const
Return true if intersection is conforming.
Definition: common/intersection.hh:273
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: albertagrid/dgfparser.hh:28
Geometry geometry() const
Definition: intersection.cc:417
NormalVector unitOuterNormal([[maybe_unused]] const LocalCoordType &local) const
Definition: intersection.cc:205
bool conforming() const
Definition: albertagrid/intersection.hh:166
Definition: albertagrid/entity.hh:29
FieldVector< ct, dimworld > integrationOuterNormal(const FieldVector< ct, dim-1 > &local) const
Definition: common/intersection.hh:498
LocalGeometry geometryInInside() const
geometrical information about this intersection in local coordinates of the inside() entity...
Definition: common/intersection.hh:291
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in...
Definition: common/intersection.hh:351
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
Intersection(Intersection &&other)
Move constructor from an existing intersection.
Definition: common/intersection.hh:438
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:132
Default Implementations of integrationOuterNormal and unitOuterNormal for IntersectionImp.
Definition: common/intersection.hh:488
FieldVector< ctype, cdim > GlobalCoordinate
type of the global coordinates
Definition: common/geometry.hh:106
Intersection(const Intersection &other)
Copy constructor from an existing intersection.
Definition: common/intersection.hh:433
Intersection & operator=(Intersection &&other)
Move assignment operator from an existing intersection.
Definition: common/intersection.hh:450
int indexInOutside() const
Definition: intersection.cc:426