dune-grid
2.3.0
|
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with the domain boundary. More...
#include <dune/grid/albertagrid/dgfparser.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. More... | |
typedef GridImp::template Codim< 0 >::EntityPointer | EntityPointer |
Pointer to the type of entities 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 | |
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... | |
EntityPointer | inside () const |
return EntityPointer to the Entity on the inside of this intersection. That is the Entity where we started this . More... | |
EntityPointer | outside () const |
return EntityPointer to the 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 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... | |
Implementor interface | |
Intersection (const Implementation &impl) | |
Protected Types | |
enum | { dim =GridImp::dimension } |
enum | { dimworld =GridImp::dimensionworld } |
typedef IntersectionImp | Implementation |
Protected Member Functions | |
Implementation & | impl () |
return reference to the real implementation More... | |
const Implementation & | impl () const |
return reference to the real implementation More... | |
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.
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 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 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<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 |
Type for normal vectors.
|
protected |
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()
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::GridPtr< GridType >::initialize(), and Dune::DGFGridFactory< HostGrid >::wasInserted().
|
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 |
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.
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::DGFGridFactory< YaspGrid< dim > >::boundaryId(), Dune::DGFGridFactory< AlbertaGrid< dim, dimworld > >::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::DGFGridFactory< AlbertaGrid< dim, dimworld > >::boundaryParameter().
|
inline |
return outer normal scaled with the integration element
Return an outer normal (length not necessarily 1) 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< const GridImp > >::boundary(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::boundarySegmentIndex(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::centerUnitOuterNormal(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::conforming(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::geometry(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::geometryInInside(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::geometryInOutside(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::impl(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::indexInInside(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::indexInOutside(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::inside(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::integrationOuterNormal(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::neighbor(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::operator=(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::outerNormal(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::outside(), Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::type(), and Dune::Intersection< const GridImp, Dune::SIntersection< const GridImp > >::unitOuterNormal().