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

[Cleanup] Fixed point iteration counter logic

parent 85e2aab3
No related branches found
No related tags found
No related merge requests found
...@@ -131,7 +131,8 @@ class FixedPointIterator { ...@@ -131,7 +131,8 @@ class FixedPointIterator {
Vector previousVelocityIterate = velocityIterate; Vector previousVelocityIterate = velocityIterate;
for (size_t fixedPointIteration = 1; size_t fixedPointIteration;
for (fixedPointIteration = 1;
fixedPointIteration <= fixedPointMaxIterations_; fixedPointIteration <= fixedPointMaxIterations_;
++fixedPointIteration) { ++fixedPointIteration) {
Vector v_m; Vector v_m;
...@@ -157,11 +158,11 @@ class FixedPointIterator { ...@@ -157,11 +158,11 @@ class FixedPointIterator {
fixedPointTolerance_) fixedPointTolerance_)
break; break;
if (fixedPointIteration == fixedPointMaxIterations_)
DUNE_THROW(Dune::Exception, "FPI failed to converge");
previousVelocityIterate = velocityIterate; previousVelocityIterate = velocityIterate;
} }
if (fixedPointIteration == fixedPointMaxIterations_)
DUNE_THROW(Dune::Exception, "FPI failed to converge");
velocityUpdater->postProcess(velocityIterate); velocityUpdater->postProcess(velocityIterate);
velocityUpdater->postProcessRelativeQuantities(); velocityUpdater->postProcessRelativeQuantities();
} }
......
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