dune-grid 2.9.0
|
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the domain boundary. More...
#include <dune/grid/common/intersection.hh>
Public Types | |
typedef IntersectionImp | Implementation |
type of underlying implementation More... | |
typedef GridImp::template Codim< 0 >::Entity | Entity |
Type of entity that this Intersection belongs to. More... | |
typedef GridImp::template Codim< 1 >::Geometry | Geometry |
Codim 1 geometry returned by geometry() More... | |
typedef Geometry::LocalCoordinate | LocalCoordinate |
Type for vectors of coordinates on the intersection. More... | |
typedef Geometry::GlobalCoordinate | GlobalCoordinate |
Type for normal vectors. More... | |
typedef GridImp::template Codim< 1 >::LocalGeometry | LocalGeometry |
Codim 1 geometry returned by geometryInInside() and geometryInOutside() More... | |
typedef GridImp::ctype | ctype |
Type of individual coefficients of coordinate vectors. More... | |
Public Member Functions | |
Implementation & | impl () |
access to the underlying implementation More... | |
const Implementation & | impl () const |
access to the underlying implementation More... | |
bool | boundary () const |
Return true if intersection is with interior or exterior boundary (see the cases above) More... | |
size_t | boundarySegmentIndex () const |
index of the boundary segment within the macro grid More... | |
bool | neighbor () const |
return true if intersection is shared with another element. More... | |
Entity | inside () const |
return Entity on the inside of this intersection. That is the Entity where we started this. More... | |
Entity | outside () const |
return Entity on the outside of this intersection. That is the neighboring Entity. More... | |
bool | conforming () const |
Return true if intersection is conforming. More... | |
LocalGeometry | geometryInInside () const |
geometrical information about this intersection in local coordinates of the inside() entity. More... | |
LocalGeometry | geometryInOutside () const |
geometrical information about this intersection in local coordinates of the outside() entity. More... | |
Geometry | geometry () const |
geometrical information about the intersection in global coordinates. More... | |
GeometryType | type () const |
obtain the type of reference element for this intersection More... | |
int | indexInInside () const |
Local index of codim 1 entity in the inside() entity where intersection is contained in. More... | |
int | indexInOutside () const |
Local index of codim 1 entity in outside() entity where intersection is contained in. More... | |
GlobalCoordinate | outerNormal (const LocalCoordinate &local) const |
Return an outer normal (length not necessarily 1) More... | |
GlobalCoordinate | integrationOuterNormal (const LocalCoordinate &local) const |
return unit outer normal scaled with the integration element More... | |
GlobalCoordinate | unitOuterNormal (const LocalCoordinate &local) const |
Return unit outer normal (length == 1) More... | |
GlobalCoordinate | centerUnitOuterNormal () const |
Return unit outer normal (length == 1) More... | |
bool | operator== (const Intersection &other) const |
Compares two intersections for equality. More... | |
bool | operator!= (const Intersection &other) const |
Compares two intersections for inequality. More... | |
Intersection () | |
Default constructor. More... | |
Intersection (const Intersection &other) | |
Copy constructor from an existing intersection. More... | |
Intersection (Intersection &&other) | |
Move constructor from an existing intersection. More... | |
Intersection & | operator= (const Intersection &other) |
Copy assignment operator from an existing intersection. More... | |
Intersection & | operator= (Intersection &&other) |
Move assignment operator from an existing intersection. More... | |
Static Public Attributes | |
static constexpr int | mydimension = GridImp::dimension - 1 |
dimension of the intersection More... | |
static constexpr int | dimensionworld = GridImp::dimensionworld |
dimension of world More... | |
Protected Attributes | |
Implementation | real |
Implementor interface | |
Intersection (const Implementation &impl) | |
Intersection (Implementation &&impl) | |
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the domain boundary.
GridImp | Type that is a model of Dune::Grid |
IntersectionImp | Class template that is a model of Dune::Intersection |
Intersections are codimension 1 objects. These intersections are accessed via an Intersection. This allows the implementation of non-matching grids, as one facet can now consist of several intersections. In a conforming mesh such an intersection corresponds to an entity of codimension 1 but in the general non-conforming case there will be no entity in the mesh that directly corresponds to the intersection. Thus, the Intersection describes these intersections implicitly.
The Intersection class template wraps an object of type IntersectionImp and forwards all member function calls to corresponding members of this class. In that sense Intersection defines the interface and IntersectionImp supplies the implementation.
The following holds for both the level and the leaf intersection : The intersection is started on a codimension 0 entity of the grid. If this entity belongs to the interior or the overlap region (see. ???) then the union of all intersections is identical to the boundary of the entity. On ghost elements the only stops on the border of the domain, i.e., only on the intersections with entities in the interior region. Depending on the boolean values returned by the methods boundary() and neighbor() one can detect the position of an intersection relative to the boundary. In general the method boundary() returns true if and only if the intersection is part of the physical boundary of the domain. The method neighbor() returns true only if the method outside() has a well defined return value.
The following cases are possible if the intersection is started on an entity in the interior or overlap region. More details are given below:
intersection | neighbor() | boundary() | outside() | |
1 | with inner, overlap or ghost entity | true | false | the neighbor entity |
2 | on domain boundary | false | true | undefined |
3 | on periodic boundary | true | true | Ghost-/Overlap cell (with transformed geometry) |
4 | on processor boundary | false if grid has no ghosts true otherwise | false | ghost entity (if it exists) |
The method geometry returns a geometry mapping the intersection as a codim one structure to global coordinates. The methods geometryInInside and geometryInOutside return geometries mapping the intersection into the reference elements of the originating entity and the neighboring entity, respectively. The indexInInside and indexInOutside methods return the codim one subentities which contain the intersection.
typedef GridImp::ctype Dune::Intersection< GridImp, IntersectionImp >::ctype |
Type of individual coefficients of coordinate vectors.
typedef GridImp::template Codim<0>::Entity Dune::Intersection< GridImp, IntersectionImp >::Entity |
Type of entity that this Intersection belongs to.
typedef GridImp::template Codim<1>::Geometry Dune::Intersection< GridImp, IntersectionImp >::Geometry |
Codim 1 geometry returned by geometry()
typedef Geometry::GlobalCoordinate Dune::Intersection< GridImp, IntersectionImp >::GlobalCoordinate |
Type for normal vectors.
typedef IntersectionImp Dune::Intersection< GridImp, IntersectionImp >::Implementation |
type of underlying implementation
typedef Geometry::LocalCoordinate Dune::Intersection< GridImp, IntersectionImp >::LocalCoordinate |
Type for vectors of coordinates on the intersection.
typedef GridImp::template Codim<1>::LocalGeometry Dune::Intersection< GridImp, IntersectionImp >::LocalGeometry |
Codim 1 geometry returned by geometryInInside() and geometryInOutside()
|
inline |
Default constructor.
|
inline |
Copy constructor from an existing intersection.
|
inline |
Move constructor from an existing intersection.
|
inline |
Copy Constructor from IntersectionImp
|
inline |
Move Constructor from IntersectionImp
|
inline |
Return true if intersection is with interior or exterior boundary (see the cases above)
|
inline |
index of the boundary segment within the macro grid
In many applications, special data needs to be attached to the boundary segments of the macro grid (e.g., a function selecting the boundary condition). Usually, this data is inherited by the children of the boundary segment.
In the DUNE framework, data is stored in arrays, addressed by an index, in this case the boundarySegmentIndex. The size of these arrays can be obtained by the Grid::numBoundarySegments method.
The indices returned by this method are consecutive, zero based, and local to the processor. Notice that these indices do not necessarily coincide with the insertion indices of the corresponding boundary segments as provided by the GridFactory.
|
inline |
Return unit outer normal (length == 1)
The returned vector is the normal at the center() of the intersection's geometry. It is scaled to have unit length.
|
inline |
Return true if intersection is conforming.
|
inline |
geometrical information about the intersection in global coordinates.
This method returns a Geometry object that provides a mapping from local coordinates of the intersection to global (world) coordinates.
|
inline |
geometrical information about this intersection in local coordinates of the inside() entity.
This method returns a Geometry object that provides a mapping from local coordinates of the intersection to local coordinates of the inside() entity.
|
inline |
geometrical information about this intersection in local coordinates of the outside() entity.
This method returns a Geometry object that provides a mapping from local coordinates of the intersection to local coordinates of the outside() entity.
|
inline |
access to the underlying implementation
|
inline |
access to the underlying implementation
|
inline |
Local index of codim 1 entity in the inside() entity where intersection is contained in.
This method returns the facet number with respect to the generic reference element.
subEntity<1>()
method to obtain the facet.
|
inline |
Local index of codim 1 entity in outside() entity where intersection is contained in.
This method returns the facet number with respect to the generic reference element.
subEntity<1>()
method to obtain the facet.
|
inline |
|
inline |
return unit outer normal scaled with the integration element
The normal is scaled with the integration element of the intersection. This method is redundant but it may be more efficient to use this function rather than computing the integration element via geometry().
The returned vector may depend on local position within the intersection.
|
inline |
return true if intersection is shared with another element.
|
inline |
Compares two intersections for inequality.
|
inline |
Copy assignment operator from an existing intersection.
|
inline |
Move assignment operator from an existing intersection.
|
inline |
Compares two intersections for equality.
|
inline |
Return an outer normal (length not necessarily 1)
The returned vector may depend on local position within the intersection.
|
inline |
return Entity on the outside of this intersection. That is the neighboring Entity.
|
inline |
obtain the type of reference element for this intersection
|
inline |
Return unit outer normal (length == 1)
The returned vector may depend on the local position within the intersection. It is scaled to have unit length.
|
staticconstexpr |
dimension of world
|
staticconstexpr |
dimension of the intersection
|
protected |