From 4f109e7f3971902fbb2e3e74fac669af359fca90 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Wed, 5 Nov 2014 07:55:35 +0000 Subject: [PATCH] Rename GlobalP?Mapper::nGlobalEntity() to GlobalP?Mapper::size() [[Imported from SVN: r9954]] --- dune/gfe/parallel/globalp1mapper.hh | 8 ++++---- dune/gfe/parallel/globalp2mapper.hh | 8 ++++---- dune/gfe/parallel/matrixcommunicator.hh | 2 +- dune/gfe/parallel/vectorcommunicator.hh | 4 ++-- dune/gfe/riemanniantrsolver.cc | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dune/gfe/parallel/globalp1mapper.hh b/dune/gfe/parallel/globalp1mapper.hh index 3f3984b2..0ad3d7a0 100644 --- a/dune/gfe/parallel/globalp1mapper.hh +++ b/dune/gfe/parallel/globalp1mapper.hh @@ -41,7 +41,7 @@ namespace Dune { GlobalIndexSet<GridView> globalVertexIndexSet(gridView,dim); // total number of degrees of freedom - nGlobalEntity_ = globalVertexIndexSet.size(dim); + size_ = globalVertexIndexSet.size(dim); // Determine for (auto it = gridView.template begin<0>(); it != gridView.template end<0>(); ++it) @@ -80,9 +80,9 @@ namespace Dune { return globalLocalMap_.find(globalIndex)->second; } - unsigned int nGlobalEntity() const + unsigned int size() const { - return nGlobalEntity_; + return size_; } P1BasisMapper p1Mapper_; @@ -90,7 +90,7 @@ namespace Dune { IndexMap localGlobalMap_; IndexMap globalLocalMap_; - size_t nGlobalEntity_; + size_t size_; }; diff --git a/dune/gfe/parallel/globalp2mapper.hh b/dune/gfe/parallel/globalp2mapper.hh index 3a8527ff..5dc676b5 100644 --- a/dune/gfe/parallel/globalp2mapper.hh +++ b/dune/gfe/parallel/globalp2mapper.hh @@ -41,7 +41,7 @@ namespace Dune { GlobalIndexSet<GridView> globalElementIndex(gridView,0); // total number of degrees of freedom - nGlobalEntity_ = globalVertexIndex.size(2) + globalEdgeIndex.size(1) + globalElementIndex.size(0); + size_ = globalVertexIndex.size(2) + globalEdgeIndex.size(1) + globalElementIndex.size(0); // Determine for (auto it = gridView.template begin<0>(); it != gridView.template end<0>(); ++it) @@ -112,9 +112,9 @@ namespace Dune { return globalLocalMap_.find(globalIndex)->second; } - unsigned int nGlobalEntity() const + unsigned int size() const { - return nGlobalEntity_; + return size_; } P2BasisMapper<GridView> p2Mapper_; @@ -123,7 +123,7 @@ namespace Dune { IndexMap globalLocalMap_; size_t nOwnedLocalEntity_; - size_t nGlobalEntity_; + size_t size_; }; diff --git a/dune/gfe/parallel/matrixcommunicator.hh b/dune/gfe/parallel/matrixcommunicator.hh index a807c167..90293bf1 100644 --- a/dune/gfe/parallel/matrixcommunicator.hh +++ b/dune/gfe/parallel/matrixcommunicator.hh @@ -76,7 +76,7 @@ public: // Create occupation pattern in matrix Dune::MatrixIndexSet occupationPattern; - occupationPattern.resize(guIndex1_.nGlobalEntity(), guIndex2_.nGlobalEntity()); + occupationPattern.resize(guIndex1_.size(), guIndex2_.size()); for (size_t k = 0; k < globalMatrixEntries.size(); ++k) occupationPattern.add(globalMatrixEntries[k].row, globalMatrixEntries[k].col); diff --git a/dune/gfe/parallel/vectorcommunicator.hh b/dune/gfe/parallel/vectorcommunicator.hh index 353951dc..88d29fc2 100644 --- a/dune/gfe/parallel/vectorcommunicator.hh +++ b/dune/gfe/parallel/vectorcommunicator.hh @@ -49,7 +49,7 @@ public: { transferVector(localVector); - VectorType globalVector(guIndex.nGlobalEntity()); + VectorType globalVector(guIndex.size()); globalVector = 0; for (size_t k = 0; k < globalVectorEntries.size(); ++k) @@ -62,7 +62,7 @@ public: { transferVector(localVector); - VectorType globalVector(guIndex.nGlobalEntity()); + VectorType globalVector(guIndex.size()); for (size_t k = 0; k < globalVectorEntries.size(); ++k) globalVector[globalVectorEntries[k].globalIndex_] = globalVectorEntries[k].value_; diff --git a/dune/gfe/riemanniantrsolver.cc b/dune/gfe/riemanniantrsolver.cc index 7ac2d840..4a3f567d 100644 --- a/dune/gfe/riemanniantrsolver.cc +++ b/dune/gfe/riemanniantrsolver.cc @@ -280,7 +280,7 @@ setup(const GridType& grid, if (rank==0) { - hasObstacle_.resize(globalMapper_->nGlobalEntity(), true); + hasObstacle_.resize(globalMapper_->size(), true); mmgStep->hasObstacle_ = &hasObstacle_; } @@ -303,7 +303,7 @@ void RiemannianTrustRegionSolver<GridType,TargetSpace>::solve() } - MaxNormTrustRegion<blocksize> trustRegion(globalMapper_->nGlobalEntity(), initialTrustRegionRadius_); + MaxNormTrustRegion<blocksize> trustRegion(globalMapper_->size(), initialTrustRegionRadius_); std::vector<BoxConstraint<field_type,blocksize> > trustRegionObstacles; -- GitLab