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

Rename method 'globalIndex' to 'index'

That's what this method is called in the dune-grid IndexSet
interface.

[[Imported from SVN: r9919]]
parent fd14219e
No related branches found
No related tags found
No related merge requests found
...@@ -306,7 +306,7 @@ public: ...@@ -306,7 +306,7 @@ public:
/** \brief Given a local index, retrieve its index globally unique over all processes. */ /** \brief Given a local index, retrieve its index globally unique over all processes. */
int globalIndex(const int& localIndex) const { int index(const int& localIndex) const {
return localGlobalMap_.find(localIndex)->second; return localGlobalMap_.find(localIndex)->second;
} }
...@@ -314,7 +314,7 @@ public: ...@@ -314,7 +314,7 @@ public:
return globalLocalMap_.find(globalIndex)->second; return globalLocalMap_.find(globalIndex)->second;
} }
int globalIndex(const typename GridView::template Codim<CODIM>::Entity& entity) const int index(const typename GridView::template Codim<CODIM>::Entity& entity) const
{ {
return localGlobalMap_.find(gridview_.indexSet().index(entity))->second; return localGlobalMap_.find(gridview_.indexSet().index(entity))->second;
} }
......
...@@ -56,7 +56,7 @@ namespace Dune { ...@@ -56,7 +56,7 @@ namespace Dune {
{ {
//int localIndex = globalVertexIndex.localIndex (*it->template subEntity<2>(i)); //int localIndex = globalVertexIndex.localIndex (*it->template subEntity<2>(i));
int localIndex = p2Mapper.map(*it, i, 2); int localIndex = p2Mapper.map(*it, i, 2);
int globalIndex = globalVertexIndex.globalIndex(*it->template subEntity<2>(i)); int globalIndex = globalVertexIndex.index(*it->template subEntity<2>(i));
localGlobalMap_[localIndex] = globalIndex; localGlobalMap_[localIndex] = globalIndex;
globalLocalMap_[globalIndex] = localIndex; globalLocalMap_[globalIndex] = localIndex;
...@@ -71,7 +71,7 @@ namespace Dune { ...@@ -71,7 +71,7 @@ namespace Dune {
{ {
//int localIndex = globalEdgeIndex.localIndex (*it->template subEntity<1>(i)) + gridView.size(2); //int localIndex = globalEdgeIndex.localIndex (*it->template subEntity<1>(i)) + gridView.size(2);
int localIndex = p2Mapper.map(*it, i, 1); int localIndex = p2Mapper.map(*it, i, 1);
int globalIndex = globalEdgeIndex.globalIndex(*it->template subEntity<1>(i)) + globalVertexIndex.nGlobalEntity(); int globalIndex = globalEdgeIndex.index(*it->template subEntity<1>(i)) + globalVertexIndex.nGlobalEntity();
localGlobalMap_[localIndex] = globalIndex; localGlobalMap_[localIndex] = globalIndex;
globalLocalMap_[globalIndex] = localIndex; globalLocalMap_[globalIndex] = localIndex;
...@@ -85,7 +85,7 @@ namespace Dune { ...@@ -85,7 +85,7 @@ namespace Dune {
{ {
//int localIndex = globalEdgeIndex.localIndex (*it->template subEntity<1>(i)) + gridView.size(2); //int localIndex = globalEdgeIndex.localIndex (*it->template subEntity<1>(i)) + gridView.size(2);
int localIndex = p2Mapper.map(*it, 0, 0); int localIndex = p2Mapper.map(*it, 0, 0);
int globalIndex = globalElementIndex.globalIndex(*it->template subEntity<0>(0)) int globalIndex = globalElementIndex.index(*it->template subEntity<0>(0))
+ globalEdgeIndex.nGlobalEntity() + globalEdgeIndex.nGlobalEntity()
+ globalVertexIndex.nGlobalEntity(); + globalVertexIndex.nGlobalEntity();
...@@ -98,7 +98,7 @@ namespace Dune { ...@@ -98,7 +98,7 @@ namespace Dune {
} }
/** \brief Given a local index, retrieve its index globally unique over all processes. */ /** \brief Given a local index, retrieve its index globally unique over all processes. */
int globalIndex(const int& localIndex) const { int index(const int& localIndex) const {
return localGlobalMap_.find(localIndex)->second; return localGlobalMap_.find(localIndex)->second;
} }
......
...@@ -34,7 +34,7 @@ class MatrixCommunicator { ...@@ -34,7 +34,7 @@ class MatrixCommunicator {
const int i = rIt.index(); const int i = rIt.index();
const int j = cIt.index(); const int j = cIt.index();
localMatrixEntries.push_back(TransferMatrixTuple(guIndex1_.globalIndex(i), guIndex2_.globalIndex(j), *cIt)); localMatrixEntries.push_back(TransferMatrixTuple(guIndex1_.index(i), guIndex2_.index(j), *cIt));
} }
// Get number of matrix entries on each process // Get number of matrix entries on each process
......
...@@ -29,7 +29,7 @@ private: ...@@ -29,7 +29,7 @@ private:
// Translate vector entries // Translate vector entries
for (size_t k=0; k<localVector.size(); k++) for (size_t k=0; k<localVector.size(); k++)
localVectorEntries.push_back(TransferVectorTuple(guIndex.globalIndex(k), localVector[k])); localVectorEntries.push_back(TransferVectorTuple(guIndex.index(k), localVector[k]));
// Get number of vector entries on each process // Get number of vector entries on each process
localVectorEntriesSizes = MPIFunctions::shareSizes(guIndex.getGridView(), localVectorEntries.size()); localVectorEntriesSizes = MPIFunctions::shareSizes(guIndex.getGridView(), localVectorEntries.size());
......
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