dune-mmesh 1.4.1-git
Loading...
Searching...
No Matches
Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > > Class Template Referenceabstract

specialization of the GridFactory for MMesh InterfaceGrid More...

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

Inheritance diagram for Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >:
Inheritance graph

Classes

struct  Codim
 

Public Types

typedef MMeshInterfaceGrid< MMeshImp > Grid
 type of interface grid
 
typedef Grid::ctype ctype
 type of (scalar) coordinates
 
typedef Grid::HostGridType HostGrid
 
typedef HostGrid::Vertex_handle VertexHandle
 
typedef MMeshImp MMesh
 type of corresponding mmesh
 
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
 
typedef std::unordered_map< std::vector< std::size_t >, std::size_t, HashUIntVectorBoundarySegments
 
typedef std::map< std::vector< std::size_t >, unsigned int > InsertionIndexMap
 
typedef std::map< std::size_t, std::size_tVertexIdMap
 
typedef Dune::Communication< typename MPIHelper::MPICommunicatorCommunication
 

Public Member Functions

 GridFactory (const std::shared_ptr< MMesh > mMesh)
 
 GridFactory ()
 
void insertElement (const GeometryType &type, const std::vector< unsigned int > &vertices)
 insert an element into the macro grid
 
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)
 
void insertVertex (const WorldVector &pos)
 Insert a vertex into the macro grid.
 
void addVertexHandle (const VertexHandle &vh)
 Add existing vertex handle from the macro grid to the interface 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
 
Grid::GridPtrType createGrid ()
 finalize grid creation and hand over the grid
 
auto getGrid ()
 
virtual void insertVertex (const FieldVector< ctype, dimworld > &pos)=0
 
virtual void insertElement (const GeometryType &, const std::vector< unsigned int > &, std::function< FieldVector< ctype, dimworld >(FieldVector< ctype, dimension >)>)
 
virtual void insertBoundarySegment (const std::vector< unsigned int > &vertices, const std::shared_ptr< BoundarySegment< dimension, dimworld > > &boundarySegment)
 
virtual unsigned int insertionIndex (const typename GridType::LeafIntersection &intersection) const
 
virtual bool wasInserted (const typename GridType::LeafIntersection &intersection) const
 
Communication comm () const
 

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
 

Static Protected Attributes

static constexpr int dimworld
 

Detailed Description

template<class MMeshImp>
class Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >

specialization of the GridFactory for MMesh InterfaceGrid

The grid factory for MMesh InterfaceGrid

Member Typedef Documentation

◆ BoundarySegment

template<class MMeshImp >
typedef Dune::BoundarySegment<dimension, dimensionworld> Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::BoundarySegment

◆ BoundarySegments

template<class MMeshImp >
typedef std::unordered_map<std::vector<std::size_t>, std::size_t, HashUIntVector> Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::BoundarySegments

◆ ctype

template<class MMeshImp >
typedef Grid::ctype Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::ctype

type of (scalar) coordinates

◆ Grid

template<class MMeshImp >
typedef MMeshInterfaceGrid<MMeshImp> Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::Grid

type of interface grid

◆ HostGrid

template<class MMeshImp >
typedef Grid::HostGridType Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::HostGrid

◆ InsertionIndexMap

template<class MMeshImp >
typedef std::map<std::vector<std::size_t>, unsigned int> Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::InsertionIndexMap

◆ MMesh

template<class MMeshImp >
typedef MMeshImp Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::MMesh

type of corresponding mmesh

◆ VertexHandle

template<class MMeshImp >
typedef HostGrid::Vertex_handle Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::VertexHandle

◆ VertexIdMap

template<class MMeshImp >
typedef std::map<std::size_t, std::size_t> Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::VertexIdMap

◆ WorldMatrix

template<class MMeshImp >
typedef FieldMatrix<ctype, dimensionworld, dimensionworld> Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::WorldMatrix

type of matrix from world coordinates to world coordinates

◆ WorldVector

template<class MMeshImp >
typedef FieldVector<ctype, dimensionworld> Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::WorldVector

type of vector for world coordinates

Constructor & Destructor Documentation

◆ GridFactory() [1/2]

template<class MMeshImp >
Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::GridFactory ( const std::shared_ptr< MMesh mMesh)
inline

default constructor

◆ GridFactory() [2/2]

template<class MMeshImp >
Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::GridFactory ( )
inline

compatibility constructor

Member Function Documentation

◆ addVertexHandle()

template<class MMeshImp >
void Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::addVertexHandle ( const VertexHandle vh)
inline

Add existing vertex handle from the macro grid to the interface grid.

Parameters
[in]vhvertex_handle of the vertex
Note
This method assumes that the vertices are inserted consecutively with respect to their index.

◆ createGrid()

template<class MMeshImp >
Grid::GridPtrType Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::createGrid ( )
inlinevirtual

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< MMeshInterfaceGrid< MMeshImp > >.

◆ getGrid()

template<class MMeshImp >
auto Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::getGrid ( )
inline

◆ insertBoundarySegment() [1/2]

template<class MMeshImp >
virtual void Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::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

Implements Dune::GridFactoryInterface< MMeshInterfaceGrid< MMeshImp > >.

◆ insertBoundarySegment() [2/2]

template<class MMeshImp >
void Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::insertBoundarySegment ( const std::vector< unsigned int > &  vertices,
const std::shared_ptr< BoundarySegment > &  boundarySegment 
)
inline

◆ insertElement()

template<class MMeshImp >
void Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::insertElement ( const GeometryType type,
const std::vector< unsigned int > &  vertices 
)
inlinevirtual

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< MMeshInterfaceGrid< MMeshImp > >.

◆ insertionIndex() [1/2]

template<class MMeshImp >
unsigned int Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::insertionIndex ( const typename Codim< 0 >::Entity entity) const
inlinevirtual

return insertion index of entity

Parameters
[in]entityEntity of codim 0

Reimplemented from Dune::GridFactoryInterface< MMeshInterfaceGrid< MMeshImp > >.

◆ insertionIndex() [2/2]

template<class MMeshImp >
unsigned int Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::insertionIndex ( const typename Codim< dimension >::Entity entity) const
inlinevirtual

return insertion index of vertex entity

Parameters
[in]entityEntity of codim dimension

Reimplemented from Dune::GridFactoryInterface< MMeshInterfaceGrid< MMeshImp > >.

◆ insertVertex()

template<class MMeshImp >
void Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::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.

Member Data Documentation

◆ dimension

template<class MMeshImp >
const int Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::dimension = Grid::dimension
static

dimension of the grid

◆ dimensionworld

template<class MMeshImp >
const int Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::dimensionworld = Grid::dimensionworld
static

dimension of the world

◆ supportPeriodicity

template<class MMeshImp >
const bool Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::supportPeriodicity = false
static

the factory is not able to create periodic meshes

◆ supportsBoundaryIds

template<class MMeshImp >
const bool Dune::GridFactory< MMeshInterfaceGrid< MMeshImp > >::supportsBoundaryIds = true
static

are boundary ids supported by this factory?


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