dune-grid-glue 2.9
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Attributes | List of all members
Dune::GridGlue::Extractor< GV, cd > Class Template Reference

Provides codimension-independent methods for grid extraction. More...

#include <dune/grid-glue/extractors/extractor.hh>

Inheritance diagram for Dune::GridGlue::Extractor< GV, cd >:
Inheritance graph

Classes

struct  CoordinateInfo
 
struct  CornerInfo
 Helpful struct holding one index for the coordinate (vertex) to which it is associated and the element's corner index;. More...
 
struct  ElementInfo
 simple struct holding an element seed and an index More...
 
struct  SubEntityInfo
 Holds some information about an element's subentity involved in a coupling. More...
 
struct  VertexInfo
 simple struct holding a vertex pointer and an index More...
 

Public Types

typedef GV GridView
 
typedef GridView::Grid Grid
 
typedef GV::Grid::ctype ctype
 
typedef Dune::FieldVector< ctype, dimworldCoords
 
typedef Dune::FieldVector< ctype, dimLocalCoords
 
typedef GV::Traits::template Codim< dim >::Entity Vertex
 
typedef Vertex::EntitySeed VertexSeed
 
typedef GV::Traits::template Codim< 0 >::Entity Element
 
typedef Element::EntitySeed ElementSeed
 
typedef std::vector< unsigned int > VertexVector
 
using CellMapper = MultipleCodimMultipleGeomTypeMapper< GridView, MCMGElementLayout >
 
typedef int IndexType
 
typedef Dune::MultiLinearGeometry< ctype, dim-codim, dimworldGeometry
 
typedef Dune::MultiLinearGeometry< ctype, dim-codim, dimLocalGeometry
 

Public Member Functions

 Extractor (const GV &gv)
 Constructor.
 
void clear ()
 delete everything build up so far and free the memory
 
void getCoords (std::vector< Dune::FieldVector< ctype, dimworld > > &coords) const
 getter for the coordinates array
 
unsigned int nCoords () const
 getter for the count of coordinates
 
void getGeometryTypes (std::vector< Dune::GeometryType > &geometryTypes) const
 Get the list of geometry types.
 
void getFaces (std::vector< VertexVector > &faces) const
 Get the corners of the extracted subentities.
 
bool faceIndices (const Element &e, int &first, int &count) const
 gets index of first subentity as well as the total number of subentities that were extracted from this element
 
int indexInInside (unsigned int index) const
 gets the number face in the parent element
 
const GridViewgridView () const
 give access to the Dune::GridView where this Patch belongs to
 
const Gridgrid () const
 
Element element (unsigned int index) const
 gets the parent element for a given face index, throws an exception if index not valid
 
Vertex vertex (unsigned int index) const
 gets the vertex for a given coordinate index throws an exception if index not valid
 
Geometry geometry (unsigned int index) const
 Get world geometry of the extracted face.
 
LocalGeometry geometryLocal (unsigned int index) const
 Get geometry of the extracted face in element coordinates.
 

Static Public Attributes

static constexpr auto dimworld = GV::dimensionworld
 
static constexpr auto dim = GV::dimension
 
static constexpr auto codim = cd
 
static constexpr int cube_corners = 1 << (dim-codim)
 

Protected Types

typedef std::map< IndexType, ElementInfoElementInfoMap
 
typedef std::map< IndexType, VertexInfoVertexInfoMap
 

Protected Attributes

const GridView gv_
 the grid object to extract the surface from
 
std::vector< CoordinateInfocoords_
 all information about the corner vertices of the extracted
 
std::vector< SubEntityInfosubEntities_
 all information about the extracted subEntities
 
VertexInfoMap vtxInfo_
 a map enabling faster access to vertices and coordinates
 
ElementInfoMap elmtInfo_
 a map enabling faster access to elements and faces
 
CellMapper cellMapper_
 

Detailed Description

template<typename GV, int cd>
class Dune::GridGlue::Extractor< GV, cd >

Provides codimension-independent methods for grid extraction.

Template Parameters
GVthe grid view type
cdcodimension of the extracted entities

Member Typedef Documentation

◆ CellMapper

template<typename GV , int cd>
using Dune::GridGlue::Extractor< GV, cd >::CellMapper = MultipleCodimMultipleGeomTypeMapper<GridView, MCMGElementLayout>

◆ Coords

template<typename GV , int cd>
typedef Dune::FieldVector<ctype, dimworld> Dune::GridGlue::Extractor< GV, cd >::Coords

◆ ctype

template<typename GV , int cd>
typedef GV::Grid::ctype Dune::GridGlue::Extractor< GV, cd >::ctype

◆ Element

template<typename GV , int cd>
typedef GV::Traits::template Codim<0>::Entity Dune::GridGlue::Extractor< GV, cd >::Element

◆ ElementInfoMap

template<typename GV , int cd>
typedef std::map<IndexType, ElementInfo> Dune::GridGlue::Extractor< GV, cd >::ElementInfoMap
protected

◆ ElementSeed

template<typename GV , int cd>
typedef Element::EntitySeed Dune::GridGlue::Extractor< GV, cd >::ElementSeed

◆ Geometry

template<typename GV , int cd>
typedef Dune::MultiLinearGeometry<ctype, dim-codim, dimworld> Dune::GridGlue::Extractor< GV, cd >::Geometry

◆ Grid

template<typename GV , int cd>
typedef GridView::Grid Dune::GridGlue::Extractor< GV, cd >::Grid

◆ GridView

template<typename GV , int cd>
typedef GV Dune::GridGlue::Extractor< GV, cd >::GridView

◆ IndexType

template<typename GV , int cd>
typedef int Dune::GridGlue::Extractor< GV, cd >::IndexType

◆ LocalCoords

template<typename GV , int cd>
typedef Dune::FieldVector<ctype, dim> Dune::GridGlue::Extractor< GV, cd >::LocalCoords

◆ LocalGeometry

template<typename GV , int cd>
typedef Dune::MultiLinearGeometry<ctype, dim-codim, dim> Dune::GridGlue::Extractor< GV, cd >::LocalGeometry

◆ Vertex

template<typename GV , int cd>
typedef GV::Traits::template Codim<dim>::Entity Dune::GridGlue::Extractor< GV, cd >::Vertex

◆ VertexInfoMap

template<typename GV , int cd>
typedef std::map<IndexType, VertexInfo> Dune::GridGlue::Extractor< GV, cd >::VertexInfoMap
protected

◆ VertexSeed

template<typename GV , int cd>
typedef Vertex::EntitySeed Dune::GridGlue::Extractor< GV, cd >::VertexSeed

◆ VertexVector

template<typename GV , int cd>
typedef std::vector<unsigned int> Dune::GridGlue::Extractor< GV, cd >::VertexVector

Constructor & Destructor Documentation

◆ Extractor()

template<typename GV , int cd>
Dune::GridGlue::Extractor< GV, cd >::Extractor ( const GV &  gv)
inline

Constructor.

Parameters
gvthe grid view object to work with

Member Function Documentation

◆ clear()

template<typename GV , int cd>
void Dune::GridGlue::Extractor< GV, cd >::clear ( )
inline

delete everything build up so far and free the memory

◆ element()

template<typename GV , int cd>
Element Dune::GridGlue::Extractor< GV, cd >::element ( unsigned int  index) const
inline

gets the parent element for a given face index, throws an exception if index not valid

Parameters
indexthe index of the face
Returns
a reference to the element's stored pointer

◆ faceIndices()

template<typename GV , int cd>
bool Dune::GridGlue::Extractor< GV, cd >::faceIndices ( const Element e,
int &  first,
int &  count 
) const
inline

gets index of first subentity as well as the total number of subentities that were extracted from this element

Parameters
[in]ethe element
[out]firstwill contain the index of the first subentity if it exists, else -1
[out]countwill contain the number of subentities extracted from this element
Returns
true if at least one subentity was extracted from this element

◆ geometry()

template<typename GV , int cd>
Extractor< GV, cd >::Geometry Dune::GridGlue::Extractor< GV, cd >::geometry ( unsigned int  index) const

Get world geometry of the extracted face.

Get World geometry of the extracted face.

◆ geometryLocal()

template<typename GV , int cd>
Extractor< GV, cd >::LocalGeometry Dune::GridGlue::Extractor< GV, cd >::geometryLocal ( unsigned int  index) const

Get geometry of the extracted face in element coordinates.

Get Geometry of the extracted face in element coordinates.

◆ getCoords()

template<typename GV , int cd>
void Dune::GridGlue::Extractor< GV, cd >::getCoords ( std::vector< Dune::FieldVector< ctype, dimworld > > &  coords) const
inline

getter for the coordinates array

Parameters
coordsa vector that will be resized (!) and filled with the coordinates, note that the single components are written consecutively

◆ getFaces()

template<typename GV , int cd>
void Dune::GridGlue::Extractor< GV, cd >::getFaces ( std::vector< VertexVector > &  faces) const
inline

Get the corners of the extracted subentities.

◆ getGeometryTypes()

template<typename GV , int cd>
void Dune::GridGlue::Extractor< GV, cd >::getGeometryTypes ( std::vector< Dune::GeometryType > &  geometryTypes) const
inline

Get the list of geometry types.

◆ grid()

template<typename GV , int cd>
const Grid & Dune::GridGlue::Extractor< GV, cd >::grid ( ) const
inline

◆ gridView()

template<typename GV , int cd>
const GridView & Dune::GridGlue::Extractor< GV, cd >::gridView ( ) const
inline

give access to the Dune::GridView where this Patch belongs to

◆ indexInInside()

template<typename GV , int cd>
int Dune::GridGlue::Extractor< GV, cd >::indexInInside ( unsigned int  index) const
inline

gets the number face in the parent element

Parameters
indexthe index of the face
Returns
if failed -1, else the index

◆ nCoords()

template<typename GV , int cd>
unsigned int Dune::GridGlue::Extractor< GV, cd >::nCoords ( ) const
inline

getter for the count of coordinates

Returns
the count

◆ vertex()

template<typename GV , int cd>
Vertex Dune::GridGlue::Extractor< GV, cd >::vertex ( unsigned int  index) const
inline

gets the vertex for a given coordinate index throws an exception if index not valid

Parameters
indexthe index of the coordinate
Returns
a reference to the vertex' stored pointer

Member Data Documentation

◆ cellMapper_

template<typename GV , int cd>
CellMapper Dune::GridGlue::Extractor< GV, cd >::cellMapper_
protected

◆ codim

template<typename GV , int cd>
constexpr auto Dune::GridGlue::Extractor< GV, cd >::codim = cd
staticconstexpr

◆ coords_

template<typename GV , int cd>
std::vector<CoordinateInfo> Dune::GridGlue::Extractor< GV, cd >::coords_
protected

all information about the corner vertices of the extracted

◆ cube_corners

template<typename GV , int cd>
constexpr int Dune::GridGlue::Extractor< GV, cd >::cube_corners = 1 << (dim-codim)
staticconstexpr

◆ dim

template<typename GV , int cd>
constexpr auto Dune::GridGlue::Extractor< GV, cd >::dim = GV::dimension
staticconstexpr

◆ dimworld

template<typename GV , int cd>
constexpr auto Dune::GridGlue::Extractor< GV, cd >::dimworld = GV::dimensionworld
staticconstexpr

◆ elmtInfo_

template<typename GV , int cd>
ElementInfoMap Dune::GridGlue::Extractor< GV, cd >::elmtInfo_
protected

a map enabling faster access to elements and faces

Maps an element's index (from index set) to an object holding the locally associated index of its first face in _indices (if there are more they are positioned consecutively) and an entity pointer to the codim<0> entity.

◆ gv_

template<typename GV , int cd>
const GridView Dune::GridGlue::Extractor< GV, cd >::gv_
protected

the grid object to extract the surface from

◆ subEntities_

template<typename GV , int cd>
std::vector<SubEntityInfo> Dune::GridGlue::Extractor< GV, cd >::subEntities_
protected

all information about the extracted subEntities

◆ vtxInfo_

template<typename GV , int cd>
VertexInfoMap Dune::GridGlue::Extractor< GV, cd >::vtxInfo_
protected

a map enabling faster access to vertices and coordinates

Maps a vertex' index (from index set) to an object holding the locally associated index of the vertex' coordinate in coords_ and an entity pointer to the codim<dim> entity.


The documentation for this class was generated from the following file: