dune-grid  2.2.1
Public Types | Public Member Functions | Static Public Attributes | List of all members
Dune::GeoGrid::IndexSet< Grid, HostIndexSet > Class Template Reference

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

Inheritance diagram for Dune::GeoGrid::IndexSet< Grid, HostIndexSet >:
Dune::IndexSet< Grid, IndexSet< Grid, HostIndexSet >, HostIndexSet::IndexType >

Public Types

typedef Base::IndexType IndexType

Public Member Functions

 IndexSet ()
 IndexSet (const HostIndexSet &hostIndexSet)
 IndexSet (const This &other)
const Thisoperator= (const This &other)
template<int cc>
IndexType index (const typename Traits::template Codim< cc >::Entity &entity) const
template<int cc>
IndexType subIndex (const typename Traits::template Codim< cc >::Entity &entity, int i, unsigned int codim) const
IndexType size (GeometryType type) const
 Return total number of entities of given geometry type in entity set $E$.
int size (int codim) const
 Return total number of entities of given codim in the entity set $E$. This is simply a sum over all geometry types.
template<class Entity >
bool contains (const Entity &entity) const
const std::vector< GeometryType > & geomTypes (int codim) const
 Return vector with all geometry types of entities in domain of index map. Return a vector with all geometry types of a given codimension contained in the Entity set $E$.
 operator bool () const
Index access from entity
IndexType index (const typename remove_const< Grid >::type::Traits::template Codim< cc >::Entity &e) const
 Map entity to index. The result of calling this method with an entity that is not in the index set is undefined.
IndexType index (const EntityType &e) const
 Map entity to index. Easier to use than the above because codimension template parameter need not be supplied explicitely. The result of calling this method with an entity that is not in the index set is undefined.
IndexType subIndex (const typename Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
 Map a subentity to an index.
IndexType subIndex (const Entity &e, int i, unsigned int codim) const
 Map a subentity to an index.
Access to entity set
bool contains (const EntityType &e) const
 Return true if the given entity is contained in $E$.

Static Public Attributes

static const int dimension = Traits::dimension

Member Typedef Documentation

template<class Grid , class HostIndexSet >
typedef Base::IndexType Dune::GeoGrid::IndexSet< Grid, HostIndexSet >::IndexType

Constructor & Destructor Documentation

template<class Grid , class HostIndexSet >
Dune::GeoGrid::IndexSet< Grid, HostIndexSet >::IndexSet ( )
inline
template<class Grid , class HostIndexSet >
Dune::GeoGrid::IndexSet< Grid, HostIndexSet >::IndexSet ( const HostIndexSet< Grid, HostIndexSet > &  hostIndexSet)
inlineexplicit
template<class Grid , class HostIndexSet >
Dune::GeoGrid::IndexSet< Grid, HostIndexSet >::IndexSet ( const This other)
inline

Member Function Documentation

template<class Grid , class HostIndexSet >
template<class Entity >
bool Dune::GeoGrid::IndexSet< Grid, HostIndexSet >::contains ( const Entity entity) const
inline
bool Dune::IndexSet< Grid , IndexSet< Grid, HostIndexSet > , HostIndexSet::IndexType >::contains ( const EntityType &  e) const
inlineinherited

Return true if the given entity is contained in $E$.

Note
If the input element e is not an element of the grid, then the result of contains() is undefined.
template<class Grid , class HostIndexSet >
const std::vector< GeometryType >& Dune::GeoGrid::IndexSet< Grid, HostIndexSet >::geomTypes ( int  codim) const
inline

Return vector with all geometry types of entities in domain of index map. Return a vector with all geometry types of a given codimension contained in the Entity set $E$.

Parameters
[in]codimA valid codimension.
Returns
Const reference to a vector of geometry types.

Reimplemented from Dune::IndexSet< Grid, IndexSet< Grid, HostIndexSet >, HostIndexSet::IndexType >.

template<class Grid , class HostIndexSet >
template<int cc>
IndexType Dune::GeoGrid::IndexSet< Grid, HostIndexSet >::index ( const typename Traits::template Codim< cc >::Entity entity) const
inline
IndexType Dune::IndexSet< Grid , IndexSet< Grid, HostIndexSet > , HostIndexSet::IndexType >::index ( const typename remove_const< Grid >::type::Traits::template Codim< cc >::Entity e) const
inlineinherited

Map entity to index. The result of calling this method with an entity that is not in the index set is undefined.

Parameters
eReference to codim cc entity, where cc is the template parameter of the function.
Returns
An index in the range 0 ... Max number of entities in set - 1.
IndexType Dune::IndexSet< Grid , IndexSet< Grid, HostIndexSet > , HostIndexSet::IndexType >::index ( const EntityType &  e) const
inlineinherited

Map entity to index. Easier to use than the above because codimension template parameter need not be supplied explicitely. The result of calling this method with an entity that is not in the index set is undefined.

Parameters
eReference to codim cc entity. Since entity knows its codimension, automatic extraction is possible.
Returns
An index in the range 0 ... Max number of entities in set - 1.
template<class Grid , class HostIndexSet >
Dune::GeoGrid::IndexSet< Grid, HostIndexSet >::operator bool ( ) const
inline
template<class Grid , class HostIndexSet >
const This& Dune::GeoGrid::IndexSet< Grid, HostIndexSet >::operator= ( const This other)
inline
template<class Grid , class HostIndexSet >
IndexType Dune::GeoGrid::IndexSet< Grid, HostIndexSet >::size ( GeometryType  type) const
inline

Return total number of entities of given geometry type in entity set $E$.

Parameters
[in]typeA valid geometry type.
Returns
number of entities.

Reimplemented from Dune::IndexSet< Grid, IndexSet< Grid, HostIndexSet >, HostIndexSet::IndexType >.

template<class Grid , class HostIndexSet >
int Dune::GeoGrid::IndexSet< Grid, HostIndexSet >::size ( int  codim) const
inline

Return total number of entities of given codim in the entity set $E$. This is simply a sum over all geometry types.

Parameters
[in]codimA valid codimension
Returns
number of entities.

Reimplemented from Dune::IndexSet< Grid, IndexSet< Grid, HostIndexSet >, HostIndexSet::IndexType >.

template<class Grid , class HostIndexSet >
template<int cc>
IndexType Dune::GeoGrid::IndexSet< Grid, HostIndexSet >::subIndex ( const typename Traits::template Codim< cc >::Entity entity,
int  i,
unsigned int  codim 
) const
inline
IndexType Dune::IndexSet< Grid , IndexSet< Grid, HostIndexSet > , HostIndexSet::IndexType >::subIndex ( const typename Traits::template Codim< cc >::Entity e,
int  i,
unsigned int  codim 
) const
inlineinherited

Map a subentity to an index.

The result of calling this method with an entity that is not in the index set is undefined.

Template Parameters
cccodimension of the entity
Parameters
[in]ereference to codimsion cc entity
[in]inumber subentity of e within the codimension
[in]codimcodimension of the subentity we're interested in (must satisfy cc <= codim <= dimension)
Returns
An index in the range 0 ... Max number of entities in set - 1.
IndexType Dune::IndexSet< Grid , IndexSet< Grid, HostIndexSet > , HostIndexSet::IndexType >::subIndex ( const Entity e,
int  i,
unsigned int  codim 
) const
inlineinherited

Map a subentity to an index.

The result of calling this method with an entity that is not in the index set is undefined.

Note
This method exists for convenience only. It extracts the codimension from the type of the entity, which can be guessed by the compiler.
Template Parameters
Entitytype of entity (must be GridImp::Codim< cc >::Entity for some cc)
Parameters
[in]ereference to entity
[in]inumber subentity of e within the codimension
[in]codimcodimension of the subentity we're interested in
Returns
An index in the range 0 ... Max number of entities in set - 1.

Member Data Documentation

template<class Grid , class HostIndexSet >
const int Dune::GeoGrid::IndexSet< Grid, HostIndexSet >::dimension = Traits::dimension
static

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