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 > 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 int IndexType
 type of index (in upcomming version this is unsigned int)

Public Member Functions

template<int cc>
int 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. Map subentity of codim 0 entity to index.
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 EntityType>
bool contains (const EntityType &e) const
 Return true if the given entity is contained in $E$.
Index access from entity
template<int cc>
int 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>
int 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>
int 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$.
int size (GeometryType type) const
 Return total number of entities of given geometry type in entity set $E$.
template<int cd, PartitionIteratorType pitype>
Codim< cd >::template Partition<
pitype >::Iterator 
begin () const
 Iterator to first entity of given codimension and partition type in $E$. The iterator type is available via the public Codim struct.
template<int cd, PartitionIteratorType pitype>
Codim< cd >::template Partition<
pitype >::Iterator 
end () const
 Iterator to one past the last entity of given codim and partition type in $E$. The iterator type is available via the public Codim struct.

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>
int 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. Map subentity of codim 0 entity to index.

Parameters:
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>
int 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::ALU2dGridHierarchicIndexSet< dim, dimworld >, Dune::ALU3dGridHierarchicIndexSet< dim, dimworld, elType >, Dune::DefaultLevelIndexSet< GridImp >, and Dune::DefaultLeafIndexSet< GridImp >.

template<class GridImp, class IndexSetImp, class IndexSetTypes>
template<class EntityType>
bool Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp, IndexSetTypes >::contains ( const EntityType &  e  )  const [inline]

template<class GridImp, class IndexSetImp, class IndexSetTypes>
template<int cc>
int 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>
int 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::ALU2dGridHierarchicIndexSet< dim, dimworld >, Dune::ALU3dGridHierarchicIndexSet< dim, dimworld, elType >, Dune::DefaultLevelIndexSet< GridImp >, and Dune::DefaultLeafIndexSet< GridImp >.

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

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.

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

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::ALU2dGridHierarchicIndexSet< dim, dimworld >, Dune::ALU3dGridHierarchicIndexSet< dim, dimworld, elType >, Dune::DefaultLevelIndexSet< GridImp >, and Dune::DefaultLeafIndexSet< GridImp >.

template<class GridImp, class IndexSetImp, class IndexSetTypes>
int 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::ALU2dGridHierarchicIndexSet< dim, dimworld >, Dune::ALU3dGridHierarchicIndexSet< dim, dimworld, elType >, Dune::DefaultLevelIndexSet< GridImp >, and Dune::DefaultLeafIndexSet< GridImp >.


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

Generated on 9 Apr 2008 with Doxygen (ver 1.5.2) [logfile].