dune-grid
2.2.0
|
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with the domain boundary. More...
#include <dune/grid/common/intersection.hh>
Public Types | |
enum | { codimension = 1 } |
Export codim of intersection (always 1) More... | |
enum | { dimension = dim } |
Export grid dimension. More... | |
enum | { mydimension = dim-1 } |
Export dimension of the intersection. More... | |
enum | { dimensionworld = dimworld } |
Export dimension of world. More... | |
typedef GridImp::template Codim< 0 >::Entity | Entity |
Type of entity that this Intersection belongs to. | |
typedef GridImp::template Codim< 0 >::EntityPointer | EntityPointer |
Pointer to the type of entities that this Intersection belongs to. | |
typedef GridImp::template Codim< 1 >::Geometry | Geometry |
Codim 1 geometry returned by geometry() | |
typedef Geometry::LocalCoordinate | LocalCoordinate |
local coordinate type used as parameter for the normals | |
typedef Geometry::GlobalCoordinate | GlobalCoordinate |
global coordinate type used as parameter for the normals | |
typedef GridImp::template Codim< 1 >::LocalGeometry | LocalGeometry |
Codim 1 geometry returned by geometryInInside and geometryInOutside() | |
typedef GridImp::ctype | ctype |
define type used for coordinates in grid module | |
typedef remove_const< GridImp > ::type | mutableGridImp |
Public Member Functions | |
bool | boundary () const |
return true if intersection is with interior or exterior boundary (see the cases above) | |
int | boundaryId () const |
Identifier for boundary segment from macro grid. | |
size_t | boundarySegmentIndex () const |
index of the boundary segment within the macro grid | |
bool | neighbor () const |
return true if intersection is shared with another element. | |
EntityPointer | inside () const |
return EntityPointer to the Entity on the inside of this intersection. That is the Entity where we started this . | |
EntityPointer | outside () const |
return EntityPointer to the Entity on the outside of this intersection. That is the neighboring Entity. | |
bool | conforming () const |
return true if intersection is conform. | |
LocalGeometry | geometryInInside () const |
geometrical information about this intersection in local coordinates of the inside() entity. | |
LocalGeometry | geometryInOutside () const |
geometrical information about this intersection in local coordinates of the outside() entity. | |
Geometry | geometry () const |
geometrical information about the intersection in global coordinates. | |
GeometryType | type () const |
obtain the type of reference element for this intersection | |
int | indexInInside () const |
Local index of codim 1 entity in the inside() entity where intersection is contained in. | |
int | indexInOutside () const |
Local index of codim 1 entity in outside() entity where intersection is contained in. | |
GlobalCoordinate | outerNormal (const LocalCoordinate &local) const |
Return an outer normal (length not necessarily 1) | |
GlobalCoordinate | integrationOuterNormal (const LocalCoordinate &local) const |
return outer normal scaled with the integration element | |
GlobalCoordinate | unitOuterNormal (const LocalCoordinate &local) const |
Return unit outer normal (length == 1) | |
GlobalCoordinate | centerUnitOuterNormal () const |
Return unit outer normal (length == 1) | |
Implementor interface | |
Intersection (const IntersectionImp< const GridImp > &i) |
Protected Types | |
enum | { dim = GridImp::dimension } |
enum | { dimworld = GridImp::dimensionworld } |
typedef IntersectionImp< const GridImp > | Implementation |
Protected Member Functions | |
Implementation & | impl () |
return reference to the real implementation | |
const Implementation & | impl () const |
return reference to the real implementation | |
Intersection (const Intersection &i) | |
const Intersection & | operator= (const Intersection &i) |
Protected Attributes | |
Implementation | real |
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with the domain boundary.
Template parameters are:
GridImp
Type that is a model of Dune::GridIntersectionImp
Class template that is a model of Dune::IntersectionIntersections are codimension 1 objects. These intersections are accessed via an Intersection. This allows the implementation of non-matching grids, as one face 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<br>(with transformed geometry) |
4 | on processor boundary | false if grid has no ghosts true otherwise | false | ghost entity (if it exists) |
The method intersectionGlobal returns a geometry mapping the intersection as a codim one structure to global coordinates. The methods intersectionSelfLocal and intersectionNeighborLocal return geometries mapping the intersection into the reference elements of the originating entity and the neighboring entity, respectively. The numberInSelf and numberInNeighbor methods return the codim one subentities which contain the intersection.
typedef GridImp::ctype Dune::Intersection< GridImp, IntersectionImp >::ctype |
define type used for coordinates in grid module
typedef GridImp::template Codim<0>::Entity Dune::Intersection< GridImp, IntersectionImp >::Entity |
Type of entity that this Intersection belongs to.
typedef GridImp::template Codim<0>::EntityPointer Dune::Intersection< GridImp, IntersectionImp >::EntityPointer |
Pointer to the type of entities 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 |
global coordinate type used as parameter for the normals
|
protected |
typedef Geometry::LocalCoordinate Dune::Intersection< GridImp, IntersectionImp >::LocalCoordinate |
local coordinate type used as parameter for the normals
typedef GridImp::template Codim<1>::LocalGeometry Dune::Intersection< GridImp, IntersectionImp >::LocalGeometry |
Codim 1 geometry returned by geometryInInside and geometryInOutside()
typedef remove_const<GridImp>::type Dune::Intersection< GridImp, IntersectionImp >::mutableGridImp |
|
protected |
|
protected |
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
|
inline |
Copy Constructor from IntersectionImp
|
inlineprotected |
|
inline |
return true if intersection is with interior or exterior boundary (see the cases above)
Referenced by Dune::DGFBaseFactory< ALUCubeGrid< 2, dimw > >::boundaryId(), Dune::GridPtr< GridType >::initialize(), and Dune::DGFGridFactory< HostGrid >::wasInserted().
|
inline |
Identifier for boundary segment from macro grid.
One can attach a boundary Id to a boundary segment on the macro grid. This Id will also be used for all fragments of these boundary segments.
The numbering is defined as:
The way the Identifiers are attached to the grid may differ between the different grid implementations.
Referenced by Dune::DGFGridFactory< HostGrid >::boundaryId().
|
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.
Referenced by Dune::DGFGridFactory< OneDGrid >::boundaryId(), Dune::GridPtr< GridType >::initialize(), and Dune::GridPtr< GridType >::parameters().
|
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 |
|
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.
Referenced by Dune::DGFGridFactory< SGrid< dim, dimworld, ctype > >::boundaryId(), Dune::DGFGridFactory< YaspGrid< dim > >::boundaryId(), Dune::DGFGridFactory< SGrid< dim, dimworld, ctype > >::boundaryParameter(), and Dune::DGFGridFactory< YaspGrid< dim > >::boundaryParameter().
|
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.
|
inlineprotected |
return reference to the real implementation
|
inlineprotected |
return reference to the real implementation
|
inline |
Local index of codim 1 entity in the inside() entity where intersection is contained in.
Referenced by Dune::DGFGridFactory< SGrid< dim, dimworld, ctype > >::boundaryId(), Dune::DGFBaseFactory< ALUCubeGrid< 2, dimw > >::boundaryId(), Dune::DGFGridFactory< YaspGrid< dim > >::boundaryId(), Dune::DGFGridFactory< AlbertaGrid< dim, dimworld > >::boundaryParameter(), Dune::DGFBaseFactory< ALUCubeGrid< 2, dimw > >::boundaryParameter(), and Dune::GridPtr< GridType >::initialize().
|
inline |
Local index of codim 1 entity in outside() entity where intersection is contained in.
|
inline |
return EntityPointer to the Entity on the inside of this intersection. That is the Entity where we started this .
Referenced by Dune::DGFBaseFactory< ALUCubeGrid< 2, dimw > >::boundaryId(), Dune::DGFGridFactory< AlbertaGrid< dim, dimworld > >::boundaryParameter(), and Dune::DGFBaseFactory< ALUCubeGrid< 2, dimw > >::boundaryParameter().
|
inline |
return outer normal scaled with the integration element
\copybrief Dune::Intersection::outerNormal
The returned vector may depend on local position within the intersection. The normal is scaled with the integration element of the intersection. This method is redundant but it may be more efficent to use this function rather than computing the integration element via intersectionGlobal().
|
inline |
return true if intersection is shared with another element.
|
inlineprotected |
|
inline |
Return an outer normal (length not necessarily 1)
The returned vector may depend on local position within the intersection.
|
inline |
return EntityPointer to the Entity on the outside of this intersection. That is the neighboring Entity.
|
inline |
obtain the type of reference element for this intersection
Referenced by Dune::GridPtr< GridType >::initialize().
|
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.
|
friend |
|
friend |
give the pseudo IntersectionIterator class access to the realImp
|
protected |
Referenced by Dune::Intersection< const GridImp, Dune::SIntersection >::boundary(), Dune::Intersection< const GridImp, Dune::SIntersection >::boundaryId(), Dune::Intersection< const GridImp, Dune::SIntersection >::boundarySegmentIndex(), Dune::Intersection< const GridImp, Dune::SIntersection >::centerUnitOuterNormal(), Dune::Intersection< const GridImp, Dune::SIntersection >::conforming(), Dune::Intersection< const GridImp, Dune::SIntersection >::geometry(), Dune::Intersection< const GridImp, Dune::SIntersection >::geometryInInside(), Dune::Intersection< const GridImp, Dune::SIntersection >::geometryInOutside(), Dune::Intersection< const GridImp, Dune::SIntersection >::impl(), Dune::Intersection< const GridImp, Dune::SIntersection >::indexInInside(), Dune::Intersection< const GridImp, Dune::SIntersection >::indexInOutside(), Dune::Intersection< const GridImp, Dune::SIntersection >::inside(), Dune::Intersection< const GridImp, Dune::SIntersection >::integrationOuterNormal(), Dune::Intersection< const GridImp, Dune::SIntersection >::neighbor(), Dune::Intersection< const GridImp, Dune::SIntersection >::operator=(), Dune::Intersection< const GridImp, Dune::SIntersection >::outerNormal(), Dune::Intersection< const GridImp, Dune::SIntersection >::outside(), Dune::Intersection< const GridImp, Dune::SIntersection >::type(), and Dune::Intersection< const GridImp, Dune::SIntersection >::unitOuterNormal().