Skip to content
Snippets Groups Projects
Commit 28194295 authored by Markus Blatt's avatar Markus Blatt
Browse files

[Sovers] Corrects printed and stored no of iterations for no convergence.

Previously if the solver did not converge the number of iterations
that was printed and stored was one higher than the actual value.
parent 033377ca
Branches
Tags
No related merge requests found
......@@ -302,6 +302,9 @@ namespace Dune {
}
}
//correct i which is wrong if convergence was not achieved.
i=std::min(_maxit,i);
// print
if (_verbose==1)
this->printOutput(std::cout,i,def);
......@@ -437,6 +440,9 @@ namespace Dune {
}
}
//correct i which is wrong if convergence was not achieved.
i=std::min(_maxit,i);
if (_verbose==1) // printing for non verbose
this->printOutput(std::cout,i,def);
......@@ -598,6 +604,9 @@ namespace Dune {
rholast = rho; // remember rho for recurrence
}
//correct i which is wrong if convergence was not achieved.
i=std::min(_maxit,i);
if (_verbose==1) // printing for non verbose
this->printOutput(std::cout,i,def);
......@@ -864,6 +873,9 @@ namespace Dune {
norm_old = norm;
} // end for
//correct i which is wrong if convergence was not achieved.
it=std::min((double)_maxit,it);
if (_verbose==1) // printing for non verbose
this->printOutput(std::cout,it,norm);
......@@ -1110,6 +1122,9 @@ namespace Dune {
}
}
//correct i which is wrong if convergence was not achieved.
i=std::min(_maxit,i);
if (_verbose==1) // printing for non verbose
this->printOutput(std::cout,i,def);
......@@ -1369,6 +1384,9 @@ namespace Dune {
res.converged = false;
}
//correct i which is wrong if convergence was not achieved.
j=std::min(_maxit,j);
if (_verbose > 1) // print
{
this->printOutput(std::cout,j,norm,norm_old);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment