Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp, IndexSetTypes > Class Template Reference
[Grid Developer API]
#include <indexidset.hh>
Inheritance diagram for Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp, IndexSetTypes >:

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 ![]() | |
template<class EntityType> | |
bool | contains (const EntityType &e) const |
Return true if the given entity is contained in ![]() | |
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 ![]() | |
int | size (GeometryType type) const |
Return total number of entities of given geometry type in entity set ![]() | |
template<int cd, PartitionIteratorType pitype> | |
Codim< cd >::template Partition< pitype >::Iterator | begin () const |
Iterator to first entity of given codimension and partition type in ![]() | |
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 ![]() | |
Classes | |
struct | Codim |
Define types needed to iterate over the entities in the index set. More... |
Member Function Documentation
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.
int Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp, IndexSetTypes >::size | ( | int | codim | ) | const [inline] |
Return total number of entities of given codim in the entity set . 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 >.
bool Dune::IndexSetDefaultImplementation< GridImp, IndexSetImp, IndexSetTypes >::contains | ( | const EntityType & | e | ) | const [inline] |
Return true if the given entity is contained in .
- Todo:
- this code is not really valid
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 >.
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.
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 >.
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.
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 .
- 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 >.
int Dune::IndexSet< GridImp, IndexSetImp, IndexSetTypes >::size | ( | GeometryType | type | ) | const [inline, inherited] |
Return total number of entities of given geometry type in entity set .
- 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: