Skip to content
Snippets Groups Projects
Commit 63d7a91d authored by Patrick Jaap's avatar Patrick Jaap
Browse files

Merge branch 'fix/loopsolver-criterions' into 'master'

Fix: LoopSolver has to execute the criteria regardless of the verbosity mode

See merge request !59
parents c1981ad0 c5854e93
No related branches found
No related tags found
1 merge request!59Fix: LoopSolver has to execute the criteria regardless of the verbosity mode
Pipeline #41853 passed
...@@ -157,20 +157,28 @@ void Dune::Solvers::LoopSolver<VectorType, BitVectorType>::solve() ...@@ -157,20 +157,28 @@ void Dune::Solvers::LoopSolver<VectorType, BitVectorType>::solve()
std::cout.flags(oldFormatFlags); std::cout.flags(oldFormatFlags);
std::cout << this->iterationStep_->getOutput(); std::cout << this->iterationStep_->getOutput();
}
bool stop = false; // execute the stop criteria regardless of the verbosity
for(auto&& c: criteria_) bool stop = false;
for(auto&& c: criteria_)
{
auto r = c();
stop = stop or std::get<0>(r);
if (this->verbosity_ == NumProc::FULL)
{ {
auto r = c(); std::cout << std::get<1>(r);
stop = stop or std::get<0>(r);
std::cout << std::get<1>(r);
} }
}
if (this->verbosity_ == NumProc::FULL)
{
std::cout << std::endl; std::cout << std::endl;
if (stop)
break;
} }
if (stop)
break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment