From 89c3c17a0f87fef8957732e467dbaf396f4c4982 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Tue, 14 Oct 2014 14:43:35 +0000 Subject: [PATCH] Use the IndexSet 'Index' type for indices, instead of hardwiring 'int' [[Imported from SVN: r9923]] --- dune/gfe/parallel/globalp2mapper.hh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dune/gfe/parallel/globalp2mapper.hh b/dune/gfe/parallel/globalp2mapper.hh index 1da394b4..3e0861df 100644 --- a/dune/gfe/parallel/globalp2mapper.hh +++ b/dune/gfe/parallel/globalp2mapper.hh @@ -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; } -- GitLab