3.5-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | Static Public Attributes | List of all members
Dumux::FacetCouplingEmbeddings< Grids > Class Template Reference

Contains the embeddings between grids with codimension one among the grid hierarchy. All these embedments are given in insertion indices as they are read directly from the grid. Therefore, this class furthermore allows access to the insertion indices of entities. Additionally, it gives access to the grid views of the different grids on the hierarchy. More...

#include <dumux/multidomain/facet/gridmanager.hh>

Description

template<typename... Grids>
class Dumux::FacetCouplingEmbeddings< Grids >

Contains the embeddings between grids with codimension one among the grid hierarchy. All these embedments are given in insertion indices as they are read directly from the grid. Therefore, this class furthermore allows access to the insertion indices of entities. Additionally, it gives access to the grid views of the different grids on the hierarchy.

Template Parameters
Gridsthe types of the grid hierarchy
Note
Grids must be ordered in descending grid dimension

Public Types

template<std::size_t id>
using GridView = typename Grid< id >::LeafGridView
 export the i-th grid view type More...
 
using BulkGridView = GridView< bulkGridId >
 export the bulk grid type More...
 
using GridIndexType = GIType
 export the type used for indices More...
 

Public Member Functions

template<std::size_t id>
const GridView< id > & gridView () const
 return reference to the i-th grid view More...
 
template<std::size_t id, class Entity >
GridIndexType insertionIndex (const Entity &entity) const
 return the insertion index of an entity of the i-th grid More...
 
template<std::size_t id>
std::unordered_map< GridIndexType, std::vector< GridIndexType > >::mapped_type embeddedEntityIndices (const typename Grid< id >::template Codim< 0 >::Entity &element) const
 Returns the insertion indices of the entities embedded in given element. More...
 
template<std::size_t id>
std::unordered_map< GridIndexType, std::vector< GridIndexType > >::mapped_type adjoinedEntityIndices (const typename Grid< id >::template Codim< 0 >::Entity &element) const
 Returns the insertion indices of the entities in which the element is embedded. More...
 
const std::unordered_map< GridIndexType, std::vector< GridIndexType > > & embeddedEntityMap (std::size_t id) const
 Returns const reference to maps of the embedded entities. More...
 
std::unordered_map< GridIndexType, std::vector< GridIndexType > > & embeddedEntityMap (std::size_t id)
 Returns non-const reference to maps of the embedded entities. More...
 
const std::unordered_map< GridIndexType, std::vector< GridIndexType > > & adjoinedEntityMap (std::size_t id) const
 Returns const reference to the maps of the adjoined entities of dimension d+1. More...
 
std::unordered_map< GridIndexType, std::vector< GridIndexType > > & adjoinedEntityMap (std::size_t id)
 Returns non-const reference to the maps of the adjoined entities of dimension d+1. More...
 
const std::vector< GridIndexType > & gridHierarchyIndices (std::size_t id) const
 Returns the hierachy's insertion indices that make up the grid for the given id. More...
 
std::size_t numVerticesInHierarchy () const
 Returns the number of vertices contained in the entire grid hierarch. More...
 
template<std::size_t id>
void setData (std::shared_ptr< Grid< id > > gridPtr, std::shared_ptr< GridFactory< id > > gridFactoryPtr, EmbedmentMap &&embeddedEntityMap, EmbedmentMap &&adjoinedEntityMap, std::vector< GridIndexType > &&gridVertexIndices, std::size_t numVerticesInHierarchy)
 Sets the required data for a specific grid on the hierarchy. More...
 

Static Public Attributes

static constexpr std::size_t numGrids = sizeof...(Grids)
 export the number of created grids More...
 
static constexpr int bulkGridId = 0
 export the grid id of the bulk grid (descending grid dim -> always zero!) More...
 
static constexpr int bulkDim = Grid<bulkGridId>::dimension
 state the dimension of the highest-dimensional grid More...
 

Member Typedef Documentation

◆ BulkGridView

template<typename... Grids>
using Dumux::FacetCouplingEmbeddings< Grids >::BulkGridView = GridView<bulkGridId>

export the bulk grid type

◆ GridIndexType

template<typename... Grids>
using Dumux::FacetCouplingEmbeddings< Grids >::GridIndexType = GIType

export the type used for indices

◆ GridView

template<typename... Grids>
template<std::size_t id>
using Dumux::FacetCouplingEmbeddings< Grids >::GridView = typename Grid<id>::LeafGridView

export the i-th grid view type

Member Function Documentation

◆ adjoinedEntityIndices()

template<typename... Grids>
template<std::size_t id>
std::unordered_map< GridIndexType, std::vector< GridIndexType > >::mapped_type Dumux::FacetCouplingEmbeddings< Grids >::adjoinedEntityIndices ( const typename Grid< id >::template Codim< 0 >::Entity &  element) const
inline

Returns the insertion indices of the entities in which the element is embedded.

◆ adjoinedEntityMap() [1/2]

template<typename... Grids>
std::unordered_map< GridIndexType, std::vector< GridIndexType > > & Dumux::FacetCouplingEmbeddings< Grids >::adjoinedEntityMap ( std::size_t  id)
inline

Returns non-const reference to the maps of the adjoined entities of dimension d+1.

◆ adjoinedEntityMap() [2/2]

template<typename... Grids>
const std::unordered_map< GridIndexType, std::vector< GridIndexType > > & Dumux::FacetCouplingEmbeddings< Grids >::adjoinedEntityMap ( std::size_t  id) const
inline

Returns const reference to the maps of the adjoined entities of dimension d+1.

◆ embeddedEntityIndices()

template<typename... Grids>
template<std::size_t id>
std::unordered_map< GridIndexType, std::vector< GridIndexType > >::mapped_type Dumux::FacetCouplingEmbeddings< Grids >::embeddedEntityIndices ( const typename Grid< id >::template Codim< 0 >::Entity &  element) const
inline

Returns the insertion indices of the entities embedded in given element.

◆ embeddedEntityMap() [1/2]

template<typename... Grids>
std::unordered_map< GridIndexType, std::vector< GridIndexType > > & Dumux::FacetCouplingEmbeddings< Grids >::embeddedEntityMap ( std::size_t  id)
inline

Returns non-const reference to maps of the embedded entities.

◆ embeddedEntityMap() [2/2]

template<typename... Grids>
const std::unordered_map< GridIndexType, std::vector< GridIndexType > > & Dumux::FacetCouplingEmbeddings< Grids >::embeddedEntityMap ( std::size_t  id) const
inline

Returns const reference to maps of the embedded entities.

◆ gridHierarchyIndices()

template<typename... Grids>
const std::vector< GridIndexType > & Dumux::FacetCouplingEmbeddings< Grids >::gridHierarchyIndices ( std::size_t  id) const
inline

Returns the hierachy's insertion indices that make up the grid for the given id.

◆ gridView()

template<typename... Grids>
template<std::size_t id>
const GridView< id > & Dumux::FacetCouplingEmbeddings< Grids >::gridView ( ) const
inline

return reference to the i-th grid view

◆ insertionIndex()

template<typename... Grids>
template<std::size_t id, class Entity >
GridIndexType Dumux::FacetCouplingEmbeddings< Grids >::insertionIndex ( const Entity &  entity) const
inline

return the insertion index of an entity of the i-th grid

◆ numVerticesInHierarchy()

template<typename... Grids>
std::size_t Dumux::FacetCouplingEmbeddings< Grids >::numVerticesInHierarchy ( ) const
inline

Returns the number of vertices contained in the entire grid hierarch.

◆ setData()

template<typename... Grids>
template<std::size_t id>
void Dumux::FacetCouplingEmbeddings< Grids >::setData ( std::shared_ptr< Grid< id > >  gridPtr,
std::shared_ptr< GridFactory< id > >  gridFactoryPtr,
EmbedmentMap &&  embeddedEntityMap,
EmbedmentMap &&  adjoinedEntityMap,
std::vector< GridIndexType > &&  gridVertexIndices,
std::size_t  numVerticesInHierarchy 
)
inline

Sets the required data for a specific grid on the hierarchy.

Parameters
gridPtrshared pointer to this (id-th) grid
gridFactoryPtrshared pointer to this (id-th) grid factory
embeddedEntityMapmap containing the lower-dimensional entities for this grid's elements
adjoinedEntityMapmap containing the (d+1)-dimensional elements in which this grid's elements are embedded in
gridVertexIndicesThe hierachy's insertion indices that make up this grid
numVerticesInHierarchyTotal number of vertices in entire grid hierarchy

Member Data Documentation

◆ bulkDim

template<typename... Grids>
constexpr int Dumux::FacetCouplingEmbeddings< Grids >::bulkDim = Grid<bulkGridId>::dimension
staticconstexpr

state the dimension of the highest-dimensional grid

◆ bulkGridId

template<typename... Grids>
constexpr int Dumux::FacetCouplingEmbeddings< Grids >::bulkGridId = 0
staticconstexpr

export the grid id of the bulk grid (descending grid dim -> always zero!)

◆ numGrids

template<typename... Grids>
constexpr std::size_t Dumux::FacetCouplingEmbeddings< Grids >::numGrids = sizeof...(Grids)
staticconstexpr

export the number of created grids


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