Dune::DefaultLeafIndexSet< GridImp > Class Template Reference

Default LeafIndexSet. More...

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

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

List of all members.

Classes

struct  InsertEntity
struct  InsertEntity< EntityType, 0 >

Public Types

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

Public Member Functions

 DefaultLeafIndexSet (const GridType &grid)
template<class EntityType >
IndexType index (const EntityType &en) const
 return LeafIndex of given entity
template<int cd>
IndexType index (const typename GridImp::template Codim< cd >::Entity &en) const
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 codim
IndexType size (GeometryType type) const
void calcNewIndex ()
const std::vector< GeometryType > & geomTypes (int codim) const
 deliver all geometry types used in this grid
template<int cd, PartitionIteratorType pitype>
DefaultLeafIteratorTypes
< 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>
DefaultLeafIteratorTypes
< GridImp >::template Codim
< cd >::template Partition
< pitype >::Iterator 
end () const
 Iterator to one past the last entity of given codim for partition type.
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::DefaultLeafIndexSet< GridImp >

Default LeafIndexSet.


Member Typedef Documentation

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

Member Enumeration Documentation

template<class GridImp >
anonymous enum
Enumerator:
ncodim 

Constructor & Destructor Documentation

template<class GridImp >
Dune::DefaultLeafIndexSet< GridImp >::DefaultLeafIndexSet ( const GridType &  grid  )  [inline]

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


Member Function Documentation

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

Iterator to first entity of given codimension and partition type.

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

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

template<class GridImp >
template<class EntityType >
bool Dune::DefaultLeafIndexSet< GridImp >::contains ( const EntityType &  en  )  const [inline]

returns true if this set provides an index for given entity

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

template<class GridImp >
template<int cd, PartitionIteratorType pitype>
DefaultLeafIteratorTypes<GridImp>::template Codim<cd>:: template Partition<pitype>::Iterator Dune::DefaultLeafIndexSet< 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::DefaultLeafIndexSet< GridImp >::geomTypes ( int  codim  )  const [inline]

deliver all geometry types used in this grid

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

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

return LeafIndex of given entity

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

IndexType Dune::IndexSet< GridImp, DefaultLeafIndexSet< 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::DefaultLeafIndexSet< GridImp >::size ( int  codim  )  const [inline]

return size of IndexSet for a given codim

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

template<class GridImp >
IndexType Dune::DefaultLeafIndexSet< GridImp >::size ( GeometryType  type  )  const [inline]

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

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

IndexType Dune::IndexSet< GridImp, DefaultLeafIndexSet< 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, DefaultLeafIndexSet< 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::DefaultLeafIndexSet< 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, DefaultLeafIndexSet< 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].