dune-mmesh 1.4.1-git
Loading...
Searching...
No Matches
Dune::MMeshLeafIndexSet< GridImp > Class Template Reference

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

Inheritance diagram for Dune::MMeshLeafIndexSet< GridImp >:
Inheritance graph

Public Types

enum  { dim = std::remove_const<GridImp>::type::dimension }
 
typedef std::size_t IndexType
 
typedef const std::vector< GeometryTypeTypes
 
typedef std::unordered_map< MMeshImpl::MultiId, std::size_tCodimIndexMap
 

Public Member Functions

 MMeshLeafIndexSet (const GridImp *grid)
 constructor stores reference to a grid and level
 
 MMeshLeafIndexSet (const MMeshLeafIndexSet &leafIndexSet)
 
template<int codim>
std::enable_if_t< codim==0||codim==dim, IndexTypeindex (const Entity< codim, dim, GridImp, MMeshEntity > &e) const
 get index of an codim 0 or codim 2 entity
 
template<int codim>
std::enable_if_t< codim==1, IndexTypeindex (const Entity< codim, dim, GridImp, MMeshEntity > &e) const
 get index of an codim 1 entity
 
template<int codim>
std::enable_if_t< codim==2 &&dim==3, IndexTypeindex (const Entity< codim, dim, GridImp, MMeshEntity > &e) const
 get index of an codim 2 entity
 
template<class Entity >
IndexType subIndex (const Entity &e, int i, int codim)
 get subIndex of subEntity i with given codim of an entity
 
template<int cc>
std::enable_if_t< cc==dim, IndexTypesubIndex (const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e, int i, int codim) const
 get subIndex of a codim dim entity
 
template<int cc>
std::enable_if_t< cc==0, IndexTypesubIndex (const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e, int i, int codim) const
 get subIndex of a codim 0 entity
 
template<int cc>
std::enable_if_t< cc !=0 &&cc !=dim, IndexTypesubIndex (const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e, int i, int codim) const
 provide member function subIndex for other codims but disable the usage
 
std::size_t size (GeometryType type) const
 get number of entities of given type
 
std::size_t size (int codim) const
 get number of entities of given codim
 
const Types geomTypes (int codim) const
 Deliver all geometry types used in this grid.
 
Types types (int codim) const
 Deliver all geometry types used in this grid.
 
template<class EntityType , int d = dim>
std::enable_if_t< d==2 &&EntityType::codimension==0, bool > contains (const EntityType &e) const
 Return true if the given entity is contained in the index set in 2d.
 
template<class EntityType , int d = dim>
std::enable_if_t< d==2 &&EntityType::codimension==1, bool > contains (const EntityType &e) const
 
template<class EntityType , int d = dim>
std::enable_if_t< d==2 &&EntityType::codimension==2, bool > contains (const EntityType &e) const
 
template<class EntityType , int d = dim>
std::enable_if_t< d==3 &&EntityType::codimension==0, bool > contains (const EntityType &e) const
 Return true if the given entity is contained in the index set in 3d.
 
template<class EntityType , int d = dim>
std::enable_if_t< d==3 &&EntityType::codimension==1, bool > contains (const EntityType &e) const
 Return true if the given entity is contained in the index set in 3d.
 
template<class EntityType , int d = dim>
std::enable_if_t< d==3 &&EntityType::codimension==2, bool > contains (const EntityType &e) const
 Return true if the given entity is contained in the index set in 3d.
 
template<class EntityType , int d = dim>
std::enable_if_t< d==3 &&EntityType::codimension==3, bool > contains (const EntityType &e) const
 Return true if the given entity is contained in the index set in 3d.
 
template<int d = dim>
std::enable_if_t< d==2, void > update (const GridImp *grid)
 update index set in 2d
 
template<int d = dim>
std::enable_if_t< d==3, void > update (const GridImp *grid)
 update index set in 3d
 
IndexType index (const typename Traits::template Codim< cc >::Entity &e) const
 
IndexType index (const Entity &e) const
 
IndexType subIndex (const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
 
IndexType subIndex (const Entity &e, int i, unsigned int codim) const
 
bool contains (const Entity &e) const
 

Public Attributes

GridImp * grid_
 
std::array< std::size_t, dim+1 > sizeOfCodim_
 
std::array< CodimIndexMap, dim - 1 > codimIndexMap_
 

Static Public Attributes

static const int dimension
 

Member Typedef Documentation

◆ CodimIndexMap

template<class GridImp >
typedef std::unordered_map<MMeshImpl::MultiId, std::size_t> Dune::MMeshLeafIndexSet< GridImp >::CodimIndexMap

◆ IndexType

template<class GridImp >
typedef std::size_t Dune::MMeshLeafIndexSet< GridImp >::IndexType

◆ Types

template<class GridImp >
typedef const std::vector<GeometryType> Dune::MMeshLeafIndexSet< GridImp >::Types

Member Enumeration Documentation

◆ anonymous enum

template<class GridImp >
anonymous enum
Enumerator
dim 

Constructor & Destructor Documentation

◆ MMeshLeafIndexSet() [1/2]

template<class GridImp >
Dune::MMeshLeafIndexSet< GridImp >::MMeshLeafIndexSet ( const GridImp *  grid)
inline

constructor stores reference to a grid and level

◆ MMeshLeafIndexSet() [2/2]

template<class GridImp >
Dune::MMeshLeafIndexSet< GridImp >::MMeshLeafIndexSet ( const MMeshLeafIndexSet< GridImp > &  leafIndexSet)
inline

Member Function Documentation

◆ contains() [1/7]

template<class GridImp >
template<class EntityType , int d = dim>
std::enable_if_t< d==2 &&EntityType::codimension==0, bool > Dune::MMeshLeafIndexSet< GridImp >::contains ( const EntityType &  e) const
inline

Return true if the given entity is contained in the index set in 2d.

◆ contains() [2/7]

template<class GridImp >
template<class EntityType , int d = dim>
std::enable_if_t< d==2 &&EntityType::codimension==1, bool > Dune::MMeshLeafIndexSet< GridImp >::contains ( const EntityType &  e) const
inline

◆ contains() [3/7]

template<class GridImp >
template<class EntityType , int d = dim>
std::enable_if_t< d==2 &&EntityType::codimension==2, bool > Dune::MMeshLeafIndexSet< GridImp >::contains ( const EntityType &  e) const
inline

◆ contains() [4/7]

template<class GridImp >
template<class EntityType , int d = dim>
std::enable_if_t< d==3 &&EntityType::codimension==0, bool > Dune::MMeshLeafIndexSet< GridImp >::contains ( const EntityType &  e) const
inline

Return true if the given entity is contained in the index set in 3d.

◆ contains() [5/7]

template<class GridImp >
template<class EntityType , int d = dim>
std::enable_if_t< d==3 &&EntityType::codimension==1, bool > Dune::MMeshLeafIndexSet< GridImp >::contains ( const EntityType &  e) const
inline

Return true if the given entity is contained in the index set in 3d.

◆ contains() [6/7]

template<class GridImp >
template<class EntityType , int d = dim>
std::enable_if_t< d==3 &&EntityType::codimension==2, bool > Dune::MMeshLeafIndexSet< GridImp >::contains ( const EntityType &  e) const
inline

Return true if the given entity is contained in the index set in 3d.

◆ contains() [7/7]

template<class GridImp >
template<class EntityType , int d = dim>
std::enable_if_t< d==3 &&EntityType::codimension==3, bool > Dune::MMeshLeafIndexSet< GridImp >::contains ( const EntityType &  e) const
inline

Return true if the given entity is contained in the index set in 3d.

◆ geomTypes()

template<class GridImp >
const Types Dune::MMeshLeafIndexSet< GridImp >::geomTypes ( int  codim) const
inline

Deliver all geometry types used in this grid.

◆ index() [1/3]

template<class GridImp >
template<int codim>
std::enable_if_t< codim==0||codim==dim, IndexType > Dune::MMeshLeafIndexSet< GridImp >::index ( const Entity< codim, dim, GridImp, MMeshEntity > &  e) const
inline

get index of an codim 0 or codim 2 entity

◆ index() [2/3]

template<class GridImp >
template<int codim>
std::enable_if_t< codim==1, IndexType > Dune::MMeshLeafIndexSet< GridImp >::index ( const Entity< codim, dim, GridImp, MMeshEntity > &  e) const
inline

get index of an codim 1 entity

◆ index() [3/3]

template<class GridImp >
template<int codim>
std::enable_if_t< codim==2 &&dim==3, IndexType > Dune::MMeshLeafIndexSet< GridImp >::index ( const Entity< codim, dim, GridImp, MMeshEntity > &  e) const
inline

get index of an codim 2 entity

◆ size() [1/2]

template<class GridImp >
std::size_t Dune::MMeshLeafIndexSet< GridImp >::size ( GeometryType  type) const
inline

get number of entities of given type

◆ size() [2/2]

template<class GridImp >
std::size_t Dune::MMeshLeafIndexSet< GridImp >::size ( int  codim) const
inline

get number of entities of given codim

◆ subIndex() [1/4]

template<class GridImp >
template<class Entity >
IndexType Dune::MMeshLeafIndexSet< GridImp >::subIndex ( const Entity e,
int  i,
int  codim 
)
inline

get subIndex of subEntity i with given codim of an entity

◆ subIndex() [2/4]

template<class GridImp >
template<int cc>
std::enable_if_t< cc==dim, IndexType > Dune::MMeshLeafIndexSet< GridImp >::subIndex ( const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity e,
int  i,
int  codim 
) const
inline

get subIndex of a codim dim entity

◆ subIndex() [3/4]

template<class GridImp >
template<int cc>
std::enable_if_t< cc==0, IndexType > Dune::MMeshLeafIndexSet< GridImp >::subIndex ( const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity e,
int  i,
int  codim 
) const
inline

get subIndex of a codim 0 entity

◆ subIndex() [4/4]

template<class GridImp >
template<int cc>
std::enable_if_t< cc !=0 &&cc !=dim, IndexType > Dune::MMeshLeafIndexSet< GridImp >::subIndex ( const typename std::remove_const< GridImp >::type::Traits::template Codim< cc >::Entity e,
int  i,
int  codim 
) const
inline

provide member function subIndex for other codims but disable the usage

◆ types()

template<class GridImp >
Types Dune::MMeshLeafIndexSet< GridImp >::types ( int  codim) const
inline

Deliver all geometry types used in this grid.

◆ update() [1/2]

template<class GridImp >
template<int d = dim>
std::enable_if_t< d==2, void > Dune::MMeshLeafIndexSet< GridImp >::update ( const GridImp *  grid)
inline

update index set in 2d

◆ update() [2/2]

template<class GridImp >
template<int d = dim>
std::enable_if_t< d==3, void > Dune::MMeshLeafIndexSet< GridImp >::update ( const GridImp *  grid)
inline

update index set in 3d

Member Data Documentation

◆ codimIndexMap_

template<class GridImp >
std::array<CodimIndexMap, dim - 1> Dune::MMeshLeafIndexSet< GridImp >::codimIndexMap_

◆ grid_

template<class GridImp >
GridImp* Dune::MMeshLeafIndexSet< GridImp >::grid_

◆ sizeOfCodim_

template<class GridImp >
std::array<std::size_t, dim + 1> Dune::MMeshLeafIndexSet< GridImp >::sizeOfCodim_

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