Go to the documentation of this file.
4 #ifndef DUNE_GRID_INTERSECTION_HH
5 #define DUNE_GRID_INTERSECTION_HH
160 template<
class Gr
idImp,
class IntersectionImp >
163 #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
168 friend class GridDefaultImplementation<
169 GridImp::
dimension, GridImp::dimensionworld,
170 typename GridImp::ctype,
171 typename GridImp::GridFamily> ;
186 typedef typename GridImp::template Codim<0>::Entity
Entity;
189 typedef typename GridImp::template Codim<1>::Geometry
Geometry;
203 enum DUNE_DEPRECATED_MSG(
"Deprecated: codimensions of an intersection are always 1!") {
codimension=1 };
210 enum DUNE_DEPRECATED_MSG(
"Deprecated: get this dimension from the grid itself, or from an element!") {
dimension=GridImp::dimension };
219 typedef typename GridImp::ctype
ctype;
227 #if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
243 int boundaryId ()
const
280 return this->real.
inside();
359 return this->real.
type();
442 return real.equals(other.real);
448 return !
real.equals(other.real);
475 real = std::move(other.real);
510 template<
class Gr
idImp,
class IntersectionImp >
513 enum { dim=GridImp::dimension };
514 enum { dimworld=GridImp::dimensionworld };
515 typedef typename GridImp::ctype ct;
523 FieldVector<ct, dimworld> n = asImp().unitOuterNormal(local);
524 n *= asImp().geometry().integrationElement(local);
531 FieldVector<ct, dimworld> n = asImp().outerNormal(local);
541 const ReferenceElement<ct, dim-1> & refElement =
542 ReferenceElements<ct, dim-1>::general(type);
543 return asImp().unitOuterNormal(refElement.position(0,0));
551 IntersectionImp &asImp () {
return static_cast< IntersectionImp & >( *
this ); }
552 const IntersectionImp &asImp ()
const {
return static_cast< const IntersectionImp & >( *
this ); }
557 #endif // DUNE_GRID_INTERSECTION_HH
Different resources needed by all grid implementations.
bool operator==(const Intersection &other) const
Compares two intersections for equality.
Definition: common/intersection.hh:440
FieldVector< ct, dimworld > integrationOuterNormal(const FieldVector< ct, dim-1 > &local) const
Definition: common/intersection.hh:521
GlobalCoordinate integrationOuterNormal(const LocalCoordinate &local) const
return unit outer normal scaled with the integration element
Definition: common/intersection.hh:413
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: albertagrid/dgfparser.hh:26
GlobalCoordinate centerUnitOuterNormal() const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:434
Include standard header files.
Definition: agrid.hh:59
size_t boundarySegmentIndex() const
index of the boundary segment within the macro grid
Definition: common/intersection.hh:264
Intersection & operator=(const Intersection &other)
Copy assignment operator from an existing intersection.
Definition: common/intersection.hh:466
GlobalCoordinate unitOuterNormal(const LocalCoordinate &local) const
Return unit outer normal (length == 1)
Definition: common/intersection.hh:423
int indexInInside() const
Local index of codim 1 entity in the inside() entity where intersection is contained in.
Definition: common/intersection.hh:374
NormalVector integrationOuterNormal(const LocalCoordType &local) const
Definition: intersection.cc:188
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:345
Geometry geometry() const
Definition: intersection.cc:455
LocalGeometry geometryInOutside() const
geometrical information about this intersection in local coordinates of the outside() entity.
Definition: common/intersection.hh:332
bool conforming() const
Definition: intersection.cc:414
Definition: common/intersection.hh:213
LocalGeometry geometryInOutside() const
Definition: intersection.cc:440
Implementation & impl()
return reference to the real implementation
Definition: common/intersection.hh:177
FieldVector< ct, dimworld > centerUnitOuterNormal() const
return unit outer normal at center of intersection geometry
Definition: common/intersection.hh:537
FieldVector< ctype, mydim > LocalCoordinate
type of local coordinates
Definition: common/geometry.hh:93
int indexInOutside() const
Local index of codim 1 entity in outside() entity where intersection is contained in.
Definition: common/intersection.hh:391
GeometryType
Type representing VTK's entity geometry types.
Definition: common.hh:178
Intersection(const Implementation &impl)
Definition: common/intersection.hh:486
GridImp::ctype ctype
Type of individual coefficients of coordinate vectors.
Definition: common/intersection.hh:219
Definition: common/intersection.hh:216
GeometryType type() const
Definition: intersection.cc:80
bool neighbor() const
return true if intersection is shared with another element.
Definition: common/intersection.hh:270
Entity outside() const
return Entity on the outside of this intersection. That is the neighboring Entity.
Definition: common/intersection.hh:289
Geometry::GlobalCoordinate GlobalCoordinate
Type for normal vectors.
Definition: common/intersection.hh:195
NormalVector outerNormal(const LocalCoordType &local) const
Definition: intersection.cc:196
Implementation real
Definition: common/intersection.hh:182
int indexInInside() const
Definition: intersection.cc:72
GlobalCoordinate outerNormal(const LocalCoordinate &local) const
Return an outer normal (length not necessarily 1)
Definition: common/intersection.hh:400
NormalVector centerUnitOuterNormal() const
Definition: intersection.cc:178
FieldVector< ct, dimworld > unitOuterNormal(const FieldVector< ct, dim-1 > &local) const
return unit outer normal
Definition: common/intersection.hh:529
bool boundary() const
Return true if intersection is with interior or exterior boundary (see the cases above)
Definition: common/intersection.hh:222
LocalGeometry geometryInInside() const
geometrical information about this intersection in local coordinates of the inside() entity.
Definition: common/intersection.hh:314
GridImp::template Codim< 1 >::LocalGeometry LocalGeometry
Codim 1 geometry returned by geometryInInside() and geometryInOutside()
Definition: common/intersection.hh:198
Geometry geometry() const
geometrical information about the intersection in global coordinates.
Definition: common/intersection.hh:351
int indexInOutside() const
Definition: intersection.cc:464
bool neighbor() const
Definition: intersection.cc:420
Geometry::LocalCoordinate LocalCoordinate
Type for vectors of coordinates on the intersection.
Definition: common/intersection.hh:192
FieldVector< ctype, cdim > GlobalCoordinate
type of the global coordinates
Definition: common/geometry.hh:96
GeometryType type() const
obtain the type of reference element for this intersection
Definition: common/intersection.hh:357
Definition: common/intersection.hh:203
size_t boundarySegmentIndex() const
Definition: intersection.cc:62
bool boundary() const
Definition: intersection.cc:41
Entity inside() const
return Entity on the inside of this intersection. That is the Entity where we started this.
Definition: common/intersection.hh:278
Intersection(const Intersection &other)
Copy constructor from an existing intersection.
Definition: common/intersection.hh:456
bool operator!=(const Intersection &other) const
Compares two intersections for inequality.
Definition: common/intersection.hh:446
GridImp::template Codim< 1 >::Geometry Geometry
Codim 1 geometry returned by geometry()
Definition: common/intersection.hh:189
Intersection()
Default constructor.
Definition: common/intersection.hh:452
Intersection(Intersection &&other)
Move constructor from an existing intersection.
Definition: common/intersection.hh:461
GridImp::template Codim< 0 >::Entity Entity
Type of entity that this Intersection belongs to.
Definition: common/intersection.hh:186
Intersection(Implementation &&impl)
Definition: common/intersection.hh:491
Default Implementations of integrationOuterNormal and unitOuterNormal for IntersectionImp.
Definition: common/intersection.hh:511
Definition: common/intersection.hh:210
GridImp::template Codim< 0 >::Entity outside() const
Definition: intersection.cc:397
int boundaryId() const
Definition: intersection.cc:48
bool conforming() const
Return true if intersection is conforming.
Definition: common/intersection.hh:296
Entity inside() const
Definition: intersection.cc:33
const Implementation & impl() const
return reference to the real implementation
Definition: common/intersection.hh:179
Intersection & operator=(Intersection &&other)
Move assignment operator from an existing intersection.
Definition: common/intersection.hh:473
Definition: albertagrid/entity.hh:30
LocalGeometry geometryInInside() const
Definition: intersection.cc:429
NormalVector unitOuterNormal(const LocalCoordType &local) const
Definition: intersection.cc:204