dune-grid
2.1.1
|
DefaultLevelIndexSet creates a LevelIndexSet for a Grid by using its HierarchicIndexSet. More...
#include <dune/grid/alugrid/common/defaultindexsets.hh>
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) |
DefaultLevelIndexSet creates a LevelIndexSet for a Grid by using its HierarchicIndexSet.
typedef GridType :: HierarchicIndexSet Dune::DefaultLevelIndexSet< GridImp >::HierarchicIndexSetType |
typedef unsigned int Dune::DefaultLevelIndexSet< GridImp >::IndexType |
type of index
Reimplemented from Dune::IndexSet< GridImp, DefaultLevelIndexSet< GridImp >, unsigned int >.
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().
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.
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
References Dune::DefaultLevelIndexSet< GridImp >::ncodim.
Referenced by Dune::DefaultLevelIndexSet< GridImp >::DefaultLevelIndexSet().
void Dune::DefaultLevelIndexSet< GridImp >::checkLevelIndexForCodim | ( | ) | [inline] |
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 >.
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().
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.
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 >.
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.
e | Reference to codim cc entity, where cc is the template parameter of the function. |
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::DefaultLevelIndexSet< GridImp >::index | ( | const typename GridImp::template Codim< cd >::Entity & | en | ) | const [inline] |
return LevelIndex of given entity
IndexType Dune::DefaultLevelIndexSet< GridImp >::size | ( | int | codim | ) | const [inline] |
return size of IndexSet for a given level and codim
Reimplemented from Dune::IndexSet< GridImp, DefaultLevelIndexSet< GridImp >, unsigned int >.
Referenced by Dune::DefaultLevelIndexSet< GridImp >::containsIndex().
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.
cc | codimension of the entity |
[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) |
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.
Entity | type of entity (must be GridImp::Codim< cc >::Entity for some cc) |
[in] | e | reference to entity |
[in] | i | number subentity of e within the codimension |
[in] | codim | codimension of the subentity we're interested in |
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
const int Dune::IndexSet< GridImp, DefaultLevelIndexSet< GridImp > , unsigned int >::dimension [static, inherited] |
dimension of the grid (maximum allowed codimension)