Skip to content
Snippets Groups Projects
Commit 32350371 authored by Elias Pipping's avatar Elias Pipping
Browse files

[Cleanup] Do not require 2 fixed point iterations

parent 0e1a613c
No related branches found
No related tags found
No related merge requests found
......@@ -128,7 +128,7 @@ class FixedPointIterator {
multigridStep, velocityMaxIterations_, velocityTolerance_,
&velocityMatrixNorm, verbosity_, false); // absolute error
Vector previousVelocityIterate;
Vector previousVelocityIterate = velocityIterate;
for (size_t fixedPointIteration = 1;
fixedPointIteration <= fixedPointMaxIterations_;
......@@ -152,12 +152,10 @@ class FixedPointIterator {
velocityProblemSolver.preprocess();
velocityProblemSolver.solve();
if (fixedPointIteration > 1) {
auto const velocityCorrection =
velocityMatrixNorm.diff(previousVelocityIterate, velocityIterate);
if (velocityCorrection < fixedPointTolerance_)
break;
}
if (velocityMatrixNorm.diff(previousVelocityIterate, velocityIterate) <
fixedPointTolerance_)
break;
if (fixedPointIteration == fixedPointMaxIterations_)
DUNE_THROW(Dune::Exception, "FPI failed to converge");
......
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