Loading [MathJax]/extensions/tex2jax.js

dune-mmesh (1.4)

Dune::MMeshExplicitGridFactory< Grid > Class Template Reference

specialization of the explicit GridFactory for MMesh More...

#include <dune/mmesh/grid/explicitgridfactory.hh>

Public Types

typedef Grid::ctype ctype
 type of (scalar) coordinates
 
typedef Grid::HostGridType HostGrid
 type of the hostgrid
 
typedef FieldVector< ctype, dimensionworldWorldVector
 type of vector for world coordinates
 
typedef FieldMatrix< ctype, dimensionworld, dimensionworldWorldMatrix
 type of matrix from world coordinates to world coordinates
 
typedef Dune::BoundarySegment< dimension, dimensionworldBoundarySegment
 type of a Dune boundary segment
 
typedef Grid::IdType IdType
 type of an id
 
typedef std::unordered_map< IdType, std::size_t > BoundarySegments
 type of the boundary segment id map
 
typedef std::unordered_map< IdType, std::size_t > InterfaceSegments
 type of the interface segment set
 

Public Member Functions

 MMeshExplicitGridFactory ()
 
void insertElement (const GeometryType &type, const std::vector< unsigned int > &v)
 insert an element into the macro grid More...
 
void insertElement (const GeometryType &type, const std::vector< unsigned int > &v, const size_t domainMarker)
 insert an element into the macro grid with a given domain marker More...
 
template<int d = dimension>
std::enable_if_t< d==2, bool > isElement (const std::vector< unsigned int > &v) const
 Returns if there is a face with the given vertices in the triangulation 2. More...
 
template<int d = dimension>
std::enable_if_t< d==3, bool > isElement (const std::vector< unsigned int > &v) const
 Returns if there is a cell with the given vertices in the triangulation 3. More...
 
virtual void insertBoundarySegment (const std::vector< unsigned int > &vertices)
 insert a boundary segment into the macro grid More...
 
void insertVertex (const WorldVector &pos)
 Insert a vertex into the macro grid. More...
 
void insertInterface (const std::vector< unsigned int > &vertices, const std::size_t marker=1)
 insert an interface into the macro grid More...
 
unsigned int insertionIndex (const typename Codim< 0 >::Entity &entity) const
 return insertion index of entity More...
 
unsigned int insertionIndex (const typename Codim< dimension >::Entity &entity) const
 return insertion index of vertex entity More...
 
unsigned int insertionIndex (const typename Grid::LeafIntersection &intersection) const
 return insertion index of boundary intersection More...
 
const BoundarySegmentsboundarySegments () const
 returns the boundary segment to index map
 
const BoundaryIds & boundaryIds () const
 returns the boundary segment index to boundary id map
 
void addBoundaryId (std::size_t boundarySegmentIndex, std::size_t boundaryId)
 add a boundary id
 
std::unique_ptr< Grid > createGrid ()
 finalize grid creation and hand over the grid More...
 
const std::vector< Vertex_handle > & vertexHandles () const
 return the vertex handles
 

Static Public Attributes

static const int dimension = Grid::dimension
 dimension of the grid
 
static const int dimensionworld = Grid::dimensionworld
 dimension of the world
 
static const bool supportsBoundaryIds = true
 are boundary ids supported by this factory?
 
static const bool supportPeriodicity = false
 the factory is not able to create periodic meshes
 

Detailed Description

template<class Grid>
class Dune::MMeshExplicitGridFactory< Grid >

specialization of the explicit GridFactory for MMesh

The explicit grid factory for MMesh

Constructor & Destructor Documentation

◆ MMeshExplicitGridFactory()

template<class Grid >
Dune::MMeshExplicitGridFactory< Grid >::MMeshExplicitGridFactory ( )
inline

default constructor

Member Function Documentation

◆ createGrid()

template<class Grid >
std::unique_ptr< Grid > Dune::MMeshExplicitGridFactory< Grid >::createGrid ( )
inline

finalize grid creation and hand over the grid

This version of createGrid is original to the MMesh grid factroy, allowing to specity a grid name.

Returns
a pointer to the newly created grid

◆ insertBoundarySegment()

template<class Grid >
virtual void Dune::MMeshExplicitGridFactory< Grid >::insertBoundarySegment ( const std::vector< unsigned int > &  vertices)
inlinevirtual

insert a boundary segment into the macro grid

Only influences the ordering of the boundary segments

Parameters
[in]verticesvertex indices of boundary face

References Dune::MMeshExplicitGridFactory< Grid >::dimension.

◆ insertElement() [1/2]

template<class Grid >
void Dune::MMeshExplicitGridFactory< Grid >::insertElement ( const GeometryType &  type,
const std::vector< unsigned int > &  v 
)
inline

insert an element into the macro grid

Parameters
[in]typeGeometryType of the new element
[in]vindices of the element vertices (starting with 0)

References Dune::MMeshExplicitGridFactory< Grid >::insertElement().

Referenced by Dune::MMeshExplicitGridFactory< Grid >::insertElement().

◆ insertElement() [2/2]

template<class Grid >
void Dune::MMeshExplicitGridFactory< Grid >::insertElement ( const GeometryType &  type,
const std::vector< unsigned int > &  v,
const size_t  domainMarker 
)
inline

insert an element into the macro grid with a given domain marker

Parameters
[in]typeGeometryType of the new element
[in]vindices of the element vertices (starting with 0)
[in]domainMarkerdomain marker of element

References Dune::MMeshExplicitGridFactory< Grid >::dimension.

◆ insertInterface()

template<class Grid >
void Dune::MMeshExplicitGridFactory< Grid >::insertInterface ( const std::vector< unsigned int > &  vertices,
const std::size_t  marker = 1 
)
inline

insert an interface into the macro grid

Parameters
[in]verticesindices of the interface vertices (starting with 0)
[in]markermarker value of the interface segment (default 1)

References Dune::MMeshExplicitGridFactory< Grid >::dimension.

◆ insertionIndex() [1/3]

template<class Grid >
unsigned int Dune::MMeshExplicitGridFactory< Grid >::insertionIndex ( const typename Codim< 0 >::Entity &  entity) const
inline

return insertion index of entity

Parameters
[in]entityEntity of codim 0

◆ insertionIndex() [2/3]

template<class Grid >
unsigned int Dune::MMeshExplicitGridFactory< Grid >::insertionIndex ( const typename Codim< dimension >::Entity &  entity) const
inline

return insertion index of vertex entity

Parameters
[in]entityEntity of codim dimension

◆ insertionIndex() [3/3]

template<class Grid >
unsigned int Dune::MMeshExplicitGridFactory< Grid >::insertionIndex ( const typename Grid::LeafIntersection &  intersection) const
inline

return insertion index of boundary intersection

Parameters
[in]intersectionLeaf intersection

◆ insertVertex()

template<class Grid >
void Dune::MMeshExplicitGridFactory< Grid >::insertVertex ( const WorldVector pos)
inline

Insert a vertex into the macro grid.

Parameters
[in]posposition of the vertex (in world coordinates)
Note
This method assumes that the vertices are inserted consecutively with respect to their index.

◆ isElement() [1/2]

template<class Grid >
template<int d = dimension>
std::enable_if_t< d==2, bool > Dune::MMeshExplicitGridFactory< Grid >::isElement ( const std::vector< unsigned int > &  v) const
inline

Returns if there is a face with the given vertices in the triangulation 2.

Parameters
[in]vindices of the element vertices

References Dune::MMeshExplicitGridFactory< Grid >::dimension.

◆ isElement() [2/2]

template<class Grid >
template<int d = dimension>
std::enable_if_t< d==3, bool > Dune::MMeshExplicitGridFactory< Grid >::isElement ( const std::vector< unsigned int > &  v) const
inline

Returns if there is a cell with the given vertices in the triangulation 3.

Parameters
[in]vindices of the element vertices

References Dune::MMeshExplicitGridFactory< Grid >::dimension.


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Apr 7, 22:57, 2025)