Skip to content
Snippets Groups Projects
Commit b01278ce authored by Carsten Gräser's avatar Carsten Gräser
Browse files

[cleanup] Rename member monitors_ to criteria_

parent 459947d0
No related branches found
No related tags found
1 merge request!4Feature/flexible loopsolver monitoring
...@@ -57,8 +57,8 @@ void ::LoopSolver<VectorType, BitVectorType>::solve() ...@@ -57,8 +57,8 @@ void ::LoopSolver<VectorType, BitVectorType>::solve()
std::string header = this->iterationStep_->getOutput(); std::string header = this->iterationStep_->getOutput();
std::cout << header; std::cout << header;
for(auto&& m: monitors_) for(auto&& c: criteria_)
std::cout << m.header(); std::cout << c.header();
std::cout << std::endl; std::cout << std::endl;
...@@ -73,8 +73,8 @@ void ::LoopSolver<VectorType, BitVectorType>::solve() ...@@ -73,8 +73,8 @@ void ::LoopSolver<VectorType, BitVectorType>::solve()
for(size_t i=0; i<header.size(); ++i) for(size_t i=0; i<header.size(); ++i)
std::cout << "-"; std::cout << "-";
for(auto&& m: monitors_) for(auto&& c: criteria_)
std::cout << std::string(m.header().size(), '-'); std::cout << std::string(c.header().size(), '-');
std::cout << std::endl; std::cout << std::endl;
} }
...@@ -170,9 +170,9 @@ void ::LoopSolver<VectorType, BitVectorType>::solve() ...@@ -170,9 +170,9 @@ void ::LoopSolver<VectorType, BitVectorType>::solve()
std::cout << this->iterationStep_->getOutput(); std::cout << this->iterationStep_->getOutput();
bool stop = false; bool stop = false;
for(auto&& m: monitors_) for(auto&& c: criteria_)
{ {
auto r = m(); auto r = c();
stop = stop or std::get<0>(r); stop = stop or std::get<0>(r);
std::cout << std::get<1>(r); std::cout << std::get<1>(r);
} }
......
...@@ -67,7 +67,7 @@ public: ...@@ -67,7 +67,7 @@ public:
template<class... Args> template<class... Args>
void addCriterion(Args&&... args) void addCriterion(Args&&... args)
{ {
monitors_.emplace_back(std::forward<Args>(args)...); criteria_.emplace_back(std::forward<Args>(args)...);
} }
/** /**
...@@ -90,7 +90,7 @@ public: ...@@ -90,7 +90,7 @@ public:
const VectorType* referenceSolution_; const VectorType* referenceSolution_;
protected: protected:
std::vector<Dune::Solvers::Criterion> monitors_; std::vector<Dune::Solvers::Criterion> criteria_;
int iter_; int iter_;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment