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

Use method numLevels() instead of data member numLevels_

The latter has been removed.

[[Imported from SVN: r8650]]
parent 43add890
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment