4 #ifndef DUNE_GRID_COMMON_INTERSECTION_HH
5 #define DUNE_GRID_COMMON_INTERSECTION_HH
160 template<
class Gr
idImp,
class IntersectionImp >
190 typedef typename GridImp::template Codim<0>::Entity
Entity;
193 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
211 typedef typename GridImp::ctype
ctype;
216 return this->real.boundary();
236 return this->real.boundarySegmentIndex();
242 return this->real.neighbor();
250 return this->real.inside();
261 return this->real.outside();
268 return this->real.conforming();
286 return this->real.geometryInInside();
304 return this->real.geometryInOutside();
323 return this->real.geometry();
329 return this->real.type();
346 return this->real.indexInInside();
363 return this->real.indexInOutside();
372 return this->real.outerNormal(local);
385 return this->real.integrationOuterNormal(local);
395 return this->real.unitOuterNormal(local);
406 return this->real.centerUnitOuterNormal();
445 real = std::move(other.real);
480 template<
class Gr
idImp,
class IntersectionImp >
483 enum { dim=GridImp::dimension };
484 enum { dimworld=GridImp::dimensionworld };
485 typedef typename GridImp::ctype ct;
493 FieldVector<ct, dimworld> n = asImp().unitOuterNormal(local);
494 n *= asImp().geometry().integrationElement(local);
501 FieldVector<ct, dimworld> n = asImp().outerNormal(local);
512 return asImp().unitOuterNormal(refElement.position(0,0));
520 IntersectionImp &asImp () {
return static_cast< IntersectionImp &
>( *this ); }
521 const IntersectionImp &asImp ()
const {
return static_cast< const IntersectionImp &
>( *this ); }
Include standard header files.
Definition: agrid.hh:58
auto referenceElement(const Geometry< mydim, cdim, GridImp, GeometryImp > &geo) -> decltype(referenceElement(geo, geo.impl()))
Definition: common/geometry.hh:417
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:130
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: common/intersection.hh:162
Geometry geometry() const
geometrical information about the intersection in global coordinates.
Definition: common/intersection.hh:321
bool conforming() const
Return true if intersection is conforming.
Definition: common/intersection.hh:266
Entity outside() const
return Entity on the outside of this intersection. That is the neighboring Entity.
Definition: common/intersection.hh:259
Intersection & operator=(const Intersection &other)
Copy assignment operator from an existing intersection.
Definition: common/intersection.hh:436
int indexInOutside() const
Local index of codim 1 entity in outside() entity where intersection is contained in.
Definition: common/intersection.hh:361
Intersection & operator=(Intersection &&other)
Move assignment operator from an existing intersection.
Definition: common/intersection.hh:443
bool neighbor() const
return true if intersection is shared with another element.
Definition: common/intersection.hh:240
const Implementation & impl() const
access to the underlying implementation
Definition: common/intersection.hh:183
bool boundary() const
Return true if intersection is with interior or exterior boundary (see the cases above)
Definition: common/intersection.hh:214
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in.
Definition: common/intersection.hh:344
Intersection(Implementation &&impl)
Definition: common/intersection.hh:461
Geometry::GlobalCoordinate GlobalCoordinate
Type for normal vectors.
Definition: common/intersection.hh:199
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Codim 1 geometry returned by geometryInInside() and geometryInOutside()
Definition: common/intersection.hh:202
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:393
bool operator!=(const Intersection &other) const
Compares two intersections for inequality.
Definition: common/intersection.hh:416
GeometryType type() const
obtain the type of reference element for this intersection
Definition: common/intersection.hh:327
@ dimensionworld
Definition: common/intersection.hh:208
Intersection(Intersection &&other)
Move constructor from an existing intersection.
Definition: common/intersection.hh:431
LocalGeometry geometryInOutside() const
geometrical information about this intersection in local coordinates of the outside() entity.
Definition: common/intersection.hh:302
LocalGeometry geometryInInside() const
geometrical information about this intersection in local coordinates of the inside() entity.
Definition: common/intersection.hh:284
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition: common/intersection.hh:234
Entity inside() const
return Entity on the inside of this intersection. That is the Entity where we started this.
Definition: common/intersection.hh:248
Geometry::LocalCoordinate LocalCoordinate
Type for vectors of coordinates on the intersection.
Definition: common/intersection.hh:196
Implementation real
Definition: common/intersection.hh:186
GlobalCoordinate centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:404
GridImp::template Codim< 1 >::Geometry Geometry
Codim 1 geometry returned by geometry()
Definition: common/intersection.hh:193
GridImp::template Codim< 0 >::Entity Entity
Type of entity that this Intersection belongs to.
Definition: common/intersection.hh:190
@ mydimension
Definition: common/intersection.hh:205
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition: common/intersection.hh:370
Implementation & impl()
access to the underlying implementation
Definition: common/intersection.hh:176
Intersection()
Default constructor.
Definition: common/intersection.hh:422
GridImp::ctype ctype
Type of individual coefficients of coordinate vectors.
Definition: common/intersection.hh:211
Intersection(const Implementation &impl)
Definition: common/intersection.hh:456
IntersectionImp Implementation
type of underlying implementation
Definition: common/intersection.hh:169
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
return unit outer normal scaled with the integration element
Definition: common/intersection.hh:383
bool operator==(const Intersection &other) const
Compares two intersections for equality.
Definition: common/intersection.hh:410
Intersection(const Intersection &other)
Copy constructor from an existing intersection.
Definition: common/intersection.hh:426
FieldVector< ctype, cdim > GlobalCoordinate
type of the global coordinates
Definition: common/geometry.hh:101
FieldVector< ctype, mydim > LocalCoordinate
type of local coordinates
Definition: common/geometry.hh:98
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/intersectioniterator.hh:81
Default Implementations of integrationOuterNormal and unitOuterNormal for IntersectionImp.
Definition: common/intersection.hh:482
FieldVector< ct, dimworld > integrationOuterNormal(const FieldVector< ct, dim-1 > &local) const
Definition: common/intersection.hh:491
FieldVector< ct, dimworld > centerUnitOuterNormal() const
return unit outer normal at center of intersection geometry
Definition: common/intersection.hh:507
FieldVector< ct, dimworld > unitOuterNormal(const FieldVector< ct, dim-1 > &local) const
return unit outer normal
Definition: common/intersection.hh:499
Different resources needed by all grid implementations.