Skip to content
Snippets Groups Projects
Commit 89c3c17a authored by Oliver Sander's avatar Oliver Sander Committed by sander
Browse files

Use the IndexSet 'Index' type for indices, instead of hardwiring 'int'

[[Imported from SVN: r9923]]
parent 3d761c3f
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,10 @@ namespace Dune {
{
public:
typedef std::map<int,int> IndexMap;
/** \brief The integer number type used for indices */
typedef typename GridView::IndexSet::IndexType Index;
typedef std::map<Index,Index> IndexMap;
GlobalP2Mapper(const GridView& gridView)
{
......@@ -96,11 +99,11 @@ namespace Dune {
}
/** \brief Given a local index, retrieve its index globally unique over all processes. */
int index(const int& localIndex) const {
Index index(const int& localIndex) const {
return localGlobalMap_.find(localIndex)->second;
}
int localIndex(const int& globalIndex) const {
Index localIndex(const int& globalIndex) const {
return globalLocalMap_.find(globalIndex)->second;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment