Honor the min_iter parameter.

This also required the minIter() accessor to be made public,
so made all of the remaining accessors public.
This commit is contained in:
Atgeirr Flø Rasmussen
2015-11-24 15:21:37 +01:00
parent c956494402
commit 9275070bad
3 changed files with 17 additions and 10 deletions

View File

@@ -103,11 +103,11 @@ namespace Opm
}
linIters += report.linear_iterations;
++iteration;
} while ( (!converged && (iteration <= maxIter())) || (minIter() > iteration));
} while ( (!converged && (iteration <= maxIter())) || (iteration <= minIter()));
if (!converged) {
if (model_->terminalOutputEnabled()) {
std::cerr << "WARNING: Failed to compute converged solution in " << iteration << " iterations." << std::endl;
std::cerr << "WARNING: Failed to compute converged solution in " << iteration - 1 << " iterations." << std::endl;
}
return -1; // -1 indicates that the solver has to be restarted
}