Dune::DefaultLevelIndexSet< GridImp > Class Template Reference

DefaultLevelIndexSet creates a LevelIndexSet for a Grid by using its HierarchicIndexSet. More...

#include <dune/grid/alugrid/common/defaultindexsets.hh>

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

List of all members.

Classes

struct  InsertEntity
struct  InsertEntity< EntityType, 0 >

Public Types

enum  { ncodim = GridType::dimension + 1 }
typedef unsigned int IndexType
 type of index
typedef
GridType::HierarchicIndexSet 
HierarchicIndexSetType

Public Member Functions

 DefaultLevelIndexSet (const GridType &grid, int level)
template<class EntityType >
IndexType index (const EntityType &en) const
 return LevelIndex of given entity
template<int cd>
IndexType index (const typename GridImp::template Codim< cd >::Entity &en) const
 return LevelIndex of given entity
template<int cc>
IndexType subIndex (const typename remove_const< GridImp >::type::Traits::template Codim< cc >::Entity &e, int i, unsigned int codim) const
template<class EntityType >
bool contains (const EntityType &en) const
 returns true if this set provides an index for given entity
IndexType size (int codim) const
 return size of IndexSet for a given level and codim
IndexType size (GeometryType type) const
void calcNewIndex ()
template<int cd>
void checkLevelIndexForCodim ()
const std::vector< GeometryType > & geomTypes (int codim) const
 deliver all geometry types used in this grid
template<int cd, PartitionIteratorType pitype>
DefaultLevelIteratorTypes
< GridImp >::template Codim
< cd >::template Partition
< pitype >::Iterator 
begin () const
 Iterator to first entity of given codimension and partition type.
template<int cd, PartitionIteratorType pitype>
DefaultLevelIteratorTypes
< GridImp >::template Codim
< cd >::template Partition
< pitype >::Iterator 
end () const
 Iterator to one past the last entity of given codim for partition type.
bool containsIndex (int cd, int idx) const
 returns true if this set provides an index for given entity
Index access from entity

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

Static Public Attributes

static const int dimension
 dimension of the grid (maximum allowed codimension)

Detailed Description

template<class GridImp>
class Dune::DefaultLevelIndexSet< GridImp >

DefaultLevelIndexSet creates a LevelIndexSet for a Grid by using its HierarchicIndexSet.


Member Typedef Documentation

template<class GridImp >
typedef GridType :: HierarchicIndexSet Dune::DefaultLevelIndexSet< GridImp >::HierarchicIndexSetType
template<class GridImp >
typedef unsigned int Dune::DefaultLevelIndexSet< GridImp >::IndexType

Member Enumeration Documentation

template<class GridImp >
anonymous enum
Enumerator:
ncodim 

Constructor & Destructor Documentation

template<class GridImp >
Dune::DefaultLevelIndexSet< GridImp >::DefaultLevelIndexSet ( const GridType &  grid,
int  level 
) [inline]

create LevelIndex by using the HierarchicIndexSet of a grid for the given level

References Dune::DefaultLevelIndexSet< GridImp >::calcNewIndex().


Member Function Documentation

template<class GridImp >
template<int cd, PartitionIteratorType pitype>
DefaultLevelIteratorTypes<GridImp>::template Codim<cd>:: template Partition<pitype>::Iterator Dune::DefaultLevelIndexSet< GridImp >::begin (  )  const [inline]

Iterator to first entity of given codimension and partition type.

template<class GridImp >
void Dune::DefaultLevelIndexSet< GridImp >::calcNewIndex (  )  [inline]

do calculation of the index set, has to be called when grid was changed or if index set is created

Referenced by Dune::DefaultLevelIndexSet< GridImp >::DefaultLevelIndexSet().

template<class GridImp >
template<int cd>
void Dune::DefaultLevelIndexSet< GridImp >::checkLevelIndexForCodim (  )  [inline]
template<class GridImp >
template<class EntityType >
bool Dune::DefaultLevelIndexSet< GridImp >::contains ( const EntityType &  en  )  const [inline]

returns true if this set provides an index for given entity

Reimplemented from Dune::IndexSet< GridImp, DefaultLevelIndexSet< GridImp >, unsigned int >.

template<class GridImp >
bool Dune::DefaultLevelIndexSet< GridImp >::containsIndex ( int  cd,
int  idx 
) const [inline]

returns true if this set provides an index for given entity

References Dune::DefaultLevelIndexSet< GridImp >::size().

template<class GridImp >
template<int cd, PartitionIteratorType pitype>
DefaultLevelIteratorTypes<GridImp>::template Codim<cd>:: template Partition<pitype>::Iterator Dune::DefaultLevelIndexSet< GridImp >::end (  )  const [inline]

Iterator to one past the last entity of given codim for partition type.

template<class GridImp >
const std::vector<GeometryType>& Dune::DefaultLevelIndexSet< GridImp >::geomTypes ( int  codim  )  const [inline]

deliver all geometry types used in this grid

Reimplemented from Dune::IndexSet< GridImp, DefaultLevelIndexSet< GridImp >, unsigned int >.

template<class GridImp >
template<int cd>
IndexType Dune::DefaultLevelIndexSet< GridImp >::index ( const typename GridImp::template Codim< cd >::Entity en  )  const [inline]

return LevelIndex of given entity

template<class GridImp >
template<class EntityType >
IndexType Dune::DefaultLevelIndexSet< GridImp >::index ( const EntityType &  en  )  const [inline]

return LevelIndex of given entity

Reimplemented from Dune::IndexSet< GridImp, DefaultLevelIndexSet< GridImp >, unsigned int >.

IndexType Dune::IndexSet< GridImp, DefaultLevelIndexSet< GridImp > , unsigned int >::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 >
IndexType Dune::DefaultLevelIndexSet< GridImp >::size ( int  codim  )  const [inline]
template<class GridImp >
IndexType Dune::DefaultLevelIndexSet< GridImp >::size ( GeometryType  type  )  const [inline]

return size of IndexSet for a given level and codim this method is to be revised

Reimplemented from Dune::IndexSet< GridImp, DefaultLevelIndexSet< GridImp >, unsigned int >.

IndexType Dune::IndexSet< GridImp, DefaultLevelIndexSet< GridImp > , unsigned int >::subIndex ( const typename Traits::template Codim< cc >::Entity e,
int  i,
unsigned int  codim 
) const [inline, inherited]

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:
cc codimension of the entity
Parameters:
[in] e reference to codimsion cc entity
[in] i number subentity of e within the codimension
[in] codim codimension 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< GridImp, DefaultLevelIndexSet< GridImp > , unsigned int >::subIndex ( const Entity e,
int  i,
unsigned int  codim 
) const [inline, inherited]

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:
Entity type of entity (must be GridImp::Codim< cc >::Entity for some cc)
Parameters:
[in] e reference to entity
[in] i number subentity of e within the codimension
[in] codim codimension of the subentity we're interested in
Returns:
An index in the range 0 ... Max number of entities in set - 1.
template<class GridImp >
template<int cc>
IndexType Dune::DefaultLevelIndexSet< GridImp >::subIndex ( const typename remove_const< GridImp >::type::Traits::template Codim< cc >::Entity e,
int  i,
unsigned int  codim 
) const [inline]

return subIndex (LevelIndex) for a given Entity of codim = 0 and a given SubEntity codim and number of SubEntity


Member Data Documentation

const int Dune::IndexSet< GridImp, DefaultLevelIndexSet< GridImp > , unsigned int >::dimension [static, inherited]

dimension of the grid (maximum allowed codimension)


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

Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].