dune-mmesh 1.4.1-git
Loading...
Searching...
No Matches
Dune::GridFactory< MMesh< HostGrid, dim > > Class Template Referenceabstract

specialization of the GridFactory for MMesh More...

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

Inheritance diagram for Dune::GridFactory< MMesh< HostGrid, dim > >:
Inheritance graph

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_tBoundarySegments
 type of the boundary segment id map
 
typedef std::unordered_map< std::size_t, std::size_tBoundaryIds
 
typedef std::unordered_map< IdType, std::size_tInterfaceSegments
 type of the interface segment set
 
typedef Dune::Communication< typename MPIHelper::MPICommunicatorCommunication
 

Public Member Functions

void insertElement (const GeometryType &type, const std::vector< unsigned int > &v)
 insert an element into the macro grid
 
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
 
virtual void insertElement (const GeometryType &, const std::vector< unsigned int > &, std::function< FieldVector< ctype, dimworld >(FieldVector< ctype, 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 triangulation2.
 
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 triangulation3.
 
virtual void insertBoundarySegment (const std::vector< unsigned int > &vertices)
 insert a boundary segment into the macro grid
 
void insertBoundarySegment (const std::vector< unsigned int > &vertices, const std::shared_ptr< BoundarySegment > &boundarySegment)
 
virtual void insertBoundarySegment (const std::vector< unsigned int > &vertices, const std::shared_ptr< BoundarySegment< dimension, dimworld > > &boundarySegment)
 
void insertInterfaceBoundarySegment (const std::vector< unsigned int > &vertices)
 
void insertVertex (const WorldVector &pos)
 Insert a vertex into the macro grid.
 
virtual void insertVertex (const FieldVector< ctype, dimworld > &pos)=0
 
void insertInterface (const std::vector< unsigned int > &vertices, const std::size_t marker=1)
 insert an interface into the macro grid
 
unsigned int insertionIndex (const typename Codim< 0 >::Entity &entity) const
 return insertion index of entity
 
unsigned int insertionIndex (const typename Codim< dimension >::Entity &entity) const
 return insertion index of vertex entity
 
unsigned int insertionIndex (const typename Grid::LeafIntersection &intersection) const
 return insertion index of boundary intersection
 
virtual unsigned int insertionIndex (const typename GridType::LeafIntersection &intersection) const
 
const BoundarySegmentsboundarySegments () const
 returns the boundary segment to index map
 
const BoundaryIdsboundaryIds () 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< MMesh< HostGrid, dim > > createGrid ()
 finalize grid creation and hand over the grid
 
const std::vector< Vertex_handle > & vertexHandles () const
 return the vertex handles
 
virtual bool wasInserted (const typename GridType::LeafIntersection &intersection) const
 
Communication comm () const
 

Static Public Attributes

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

Static Protected Attributes

static constexpr int dimworld
 

Detailed Description

template<class HostGrid, int dim>
class Dune::GridFactory< MMesh< HostGrid, dim > >

specialization of the GridFactory for MMesh

Default grid factory for MMesh

Member Typedef Documentation

◆ BoundaryIds

◆ BoundarySegment

type of a Dune boundary segment

◆ BoundarySegments

type of the boundary segment id map

◆ ctype

typedef Grid::ctype Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::ctype
inherited

type of (scalar) coordinates

◆ HostGrid

typedef Grid::HostGridType Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::HostGrid
inherited

type of the hostgrid

◆ IdType

typedef Grid::IdType Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::IdType
inherited

type of an id

◆ InterfaceSegments

typedef std::unordered_map<IdType, std::size_t> Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::InterfaceSegments
inherited

type of the interface segment set

◆ WorldMatrix

type of matrix from world coordinates to world coordinates

◆ WorldVector

type of vector for world coordinates

Member Function Documentation

◆ addBoundaryId()

void Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::addBoundaryId ( std::size_t  boundarySegmentIndex,
std::size_t  boundaryId 
)
inlineinherited

add a boundary id

◆ boundaryIds()

const BoundaryIds & Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::boundaryIds ( ) const
inlineinherited

returns the boundary segment index to boundary id map

◆ boundarySegments()

const BoundarySegments & Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::boundarySegments ( ) const
inlineinherited

returns the boundary segment to index map

◆ createGrid()

std::unique_ptr< MMesh< HostGrid, dim > > Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::createGrid ( )
inlinevirtualinherited

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

Implements Dune::GridFactoryInterface< class GridType >.

◆ insertBoundarySegment() [1/2]

virtual void Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::insertBoundarySegment ( const std::vector< unsigned int > &  vertices)
inlinevirtualinherited

insert a boundary segment into the macro grid

Only influences the ordering of the boundary segments

Parameters
[in]verticesvertex indices of boundary face

Implements Dune::GridFactoryInterface< class GridType >.

◆ insertBoundarySegment() [2/2]

void Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::insertBoundarySegment ( const std::vector< unsigned int > &  vertices,
const std::shared_ptr< BoundarySegment > &  boundarySegment 
)
inlineinherited

◆ insertElement() [1/2]

void Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::insertElement ( const GeometryType type,
const std::vector< unsigned int > &  v 
)
inlinevirtualinherited

insert an element into the macro grid

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

Implements Dune::GridFactoryInterface< class GridType >.

◆ insertElement() [2/2]

void Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::insertElement ( const GeometryType type,
const std::vector< unsigned int > &  v,
const size_t  domainMarker 
)
inlineinherited

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

◆ insertInterface()

void Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::insertInterface ( const std::vector< unsigned int > &  vertices,
const std::size_t  marker = 1 
)
inlineinherited

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)

◆ insertInterfaceBoundarySegment()

void Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::insertInterfaceBoundarySegment ( const std::vector< unsigned int > &  vertices)
inlineinherited

◆ insertionIndex() [1/3]

unsigned int Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::insertionIndex ( const typename Codim< 0 >::Entity entity) const
inlinevirtualinherited

return insertion index of entity

Parameters
[in]entityEntity of codim 0

Reimplemented from Dune::GridFactoryInterface< class GridType >.

◆ insertionIndex() [2/3]

unsigned int Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::insertionIndex ( const typename Codim< dimension >::Entity entity) const
inlinevirtualinherited

return insertion index of vertex entity

Parameters
[in]entityEntity of codim dimension

Reimplemented from Dune::GridFactoryInterface< class GridType >.

◆ insertionIndex() [3/3]

unsigned int Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::insertionIndex ( const typename Grid::LeafIntersection &  intersection) const
inlineinherited

return insertion index of boundary intersection

Parameters
[in]intersectionLeaf intersection

◆ insertVertex()

void Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::insertVertex ( const WorldVector pos)
inlineinherited

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]

std::enable_if_t< d==2, bool > Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::isElement ( const std::vector< unsigned int > &  v) const
inlineinherited

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

Parameters
[in]vindices of the element vertices

◆ isElement() [2/2]

std::enable_if_t< d==3, bool > Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::isElement ( const std::vector< unsigned int > &  v) const
inlineinherited

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

Parameters
[in]vindices of the element vertices

◆ vertexHandles()

const std::vector< Vertex_handle > & Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::vertexHandles ( ) const
inlineinherited

return the vertex handles

Member Data Documentation

◆ dimension

const int Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::dimension
staticinherited

dimension of the grid

◆ dimensionworld

const int Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::dimensionworld
staticinherited

dimension of the world

◆ supportPeriodicity

const bool Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::supportPeriodicity
staticinherited

the factory is not able to create periodic meshes

◆ supportsBoundaryIds

const bool Dune::MMeshExplicitGridFactory< MMesh< HostGrid, dim > >::supportsBoundaryIds
staticinherited

are boundary ids supported by this factory?


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