From 596180ee9c00520e55a75ccb5f1b31c6aae90d13 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Fri, 3 May 2013 13:21:19 +0000 Subject: [PATCH] Use method numLevels() instead of data member numLevels_ The latter has been removed. [[Imported from SVN: r8650]] --- dune/solvers/iterationsteps/mmgstep.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dune/solvers/iterationsteps/mmgstep.cc b/dune/solvers/iterationsteps/mmgstep.cc index 12fe13f1..3f8e97dc 100644 --- a/dune/solvers/iterationsteps/mmgstep.cc +++ b/dune/solvers/iterationsteps/mmgstep.cc @@ -16,7 +16,7 @@ preprocess() MultigridStep<MatrixType,VectorType>::preprocess(); // Then specify the subset of entries to be reassembled at each iteration - recompute_.resize(this->numLevels_); + recompute_.resize(this->numLevels()); recompute_[recompute_.size()-1] = (*hasObstacle_)[recompute_.size()-1]; for (int i=this->mgTransfer_.size()-1; i>=0; i--) this->mgTransfer_[i]->restrictScalarBitField(recompute_[i+1], recompute_[i]); @@ -53,7 +53,7 @@ preprocess() template<class MatrixType, class VectorType> void MonotoneMGStep<MatrixType, VectorType>::nestedIteration() { - for (int i=this->numLevels_-1; i>0; i--) { + for (int i=this->numLevels()-1; i>0; i--) { Dune::BitSetVector<dim> dummy(this->rhsHierarchy_[i].size(), false); @@ -71,7 +71,7 @@ void MonotoneMGStep<MatrixType, VectorType>::nestedIteration() this->mgTransfer_[i-1]->restrict(this->rhsHierarchy_[i], this->rhsHierarchy_[i-1]); } - for (this->level_ = 0; this->level_<this->numLevels_-1; this->level_++) { + for (this->level_ = 0; this->level_<this->numLevels()-1; this->level_++) { // If we start from an infeasible configuration, the restricted // obstacles may be inconsistent. We do an ad hoc correction here. @@ -239,7 +239,7 @@ void MonotoneMGStep<MatrixType, VectorType>::iterate() // //////////////////////////////////////////////////////////////////// // Track the number of critical nodes found during this iteration // //////////////////////////////////////////////////////////////////// - if (level==this->numLevels_-1 && this->verbosity_==NumProc::FULL) { + if (level==this->numLevels()-1 && this->verbosity_==NumProc::FULL) { std::cout << critical.count() << " critical nodes found on level " << level; @@ -254,7 +254,7 @@ void MonotoneMGStep<MatrixType, VectorType>::iterate() } // Debug: output energy - if (level==this->numLevels_-1 && this->verbosity_==NumProc::FULL) + if (level==this->numLevels()-1 && this->verbosity_==NumProc::FULL) std::cout << "Total energy: " << std::setprecision(10) << computeEnergy(*mat[level], *x[level], rhs[level]) << std::endl; -- GitLab