Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp, IndexSetTypes > Class Template Reference
[Grid Developer API]

#include <indexidset.hh>

Inheritance diagram for Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp, IndexSetTypes >:

Dune::IndexSet< GridImp, IndexSetImp, IndexSetTypes > Dune::DefaultLeafIndexSet< GridImp > Dune::DefaultLevelIndexSet< GridImp >

List of all members.


Detailed Description

template<class GridImp, class IndexSetImp, class IndexSetTypes>
class Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp, IndexSetTypes >

Provide default implementation of method if IndexSet.

Public Types

typedef IndexSet< GridImp,
IndexSetImp, IndexSetTypes >
::IndexType 
IndexType
 The type used for the indices.

Public Member Functions

template<int cc>
IndexType subIndex (const typename remove_const< GridImp >::type::Traits::template Codim< 0 >::Entity &e, int i) const
 Return total number of entities of given codim as a sum for all geometry types in this index set.
IndexType 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 EntityType>
bool contains (const EntityType &e) const
 Return true if the given entity is contained in $E$.
Index access from entity
template<int cc>
IndexType index (const typename remove_const< GridImp >::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.
template<class EntityType>
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.
template<int cc>
IndexType subIndex (const typename remove_const< GridImp >::type::Traits::template Codim< 0 >::Entity &e, int i) const
 Map subentity of codim cc of codim 0 entity to index. The result of calling this method with an entity that is not in the index set is undefined.
Access to entity set
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$.
IndexType size (GeometryType type) const
 Return total number of entities of given geometry type in entity set $E$.

Classes

struct  Codim
 Define types needed to iterate over the entities in the index set. More...

Member Function Documentation

template<class GridImp, class IndexSetImp, class IndexSetTypes>
template<int cc>
IndexType Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp, IndexSetTypes >::subIndex ( const typename remove_const< GridImp >::type::Traits::template Codim< 0 >::Entity e,
int  i 
) const [inline]

Return total number of entities of given codim as a sum for all geometry types in this index set.

Parameters:
codim A valid codimension Map subentity of codim 0 entity to index.
e Reference to codim 0 entity.
i Number of codim cc subentity of e, where cc is the template parameter of the function.
Returns:
An index in the range 0 ... Max number of entities in set - 1. Here the method entity of Entity is used to get the subEntity and then the index of this Entity is returned.

template<class GridImp, class IndexSetImp, class IndexSetTypes>
IndexType Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp, IndexSetTypes >::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] codim A valid codimension
Returns:
number of entities.

Reimplemented from Dune::IndexSet< GridImp, IndexSetImp, IndexSetTypes >.

Reimplemented in Dune::DefaultLevelIndexSet< GridImp >, and Dune::DefaultLeafIndexSet< GridImp >.

template<class GridImp, class IndexSetImp, class IndexSetTypes>
template<int cc>
IndexType Dune::IndexSet< GridImp, IndexSetImp, IndexSetTypes >::index ( const typename remove_const< GridImp >::type::Traits::template Codim< cc >::Entity e  )  const [inline, inherited]

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

Parameters:
e Reference 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.

template<class GridImp, class IndexSetImp, class IndexSetTypes>
template<class EntityType>
IndexType Dune::IndexSet< GridImp, IndexSetImp, IndexSetTypes >::index ( const EntityType &  e  )  const [inline, inherited]

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:
e Reference 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.

Reimplemented in Dune::DefaultLevelIndexSet< GridImp >, and Dune::DefaultLeafIndexSet< GridImp >.

template<class GridImp, class IndexSetImp, class IndexSetTypes>
template<int cc>
IndexType Dune::IndexSet< GridImp, IndexSetImp, IndexSetTypes >::subIndex ( const typename remove_const< GridImp >::type::Traits::template Codim< 0 >::Entity e,
int  i 
) const [inline, inherited]

template<class GridImp, class IndexSetImp, class IndexSetTypes>
const std::vector<GeometryType>& Dune::IndexSet< GridImp, IndexSetImp, IndexSetTypes >::geomTypes ( int  codim  )  const [inline, inherited]

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] codim A valid codimension.
Returns:
Const reference to a vector of geometry types.

Reimplemented in Dune::DefaultLevelIndexSet< GridImp >, and Dune::DefaultLeafIndexSet< GridImp >.

Referenced by Dune::IndexSet< GridImp, Dune::SGridLeafIndexSet< GridImp >, Dune::SGridLeafIndexSetTypes< GridImp > >::geomTypes().

template<class GridImp, class IndexSetImp, class IndexSetTypes>
IndexType Dune::IndexSet< GridImp, IndexSetImp, IndexSetTypes >::size ( GeometryType  type  )  const [inline, inherited]

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

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

Reimplemented in Dune::DefaultLevelIndexSet< GridImp >, and Dune::DefaultLeafIndexSet< GridImp >.

Referenced by Dune::IndexSet< GridImp, Dune::SGridLeafIndexSet< GridImp >, Dune::SGridLeafIndexSetTypes< GridImp > >::size().


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

Generated on Sun Nov 15 22:28:55 2009 for dune-grid by  doxygen 1.5.6