diff --git a/dune/solvers/solvers/loopsolver.hh b/dune/solvers/solvers/loopsolver.hh index d1b1800ccd3b9a17550650d2dddd08a0f6bf1531..6b7e854c388ea412643fe0afcb626102238140ea 100644 --- a/dune/solvers/solvers/loopsolver.hh +++ b/dune/solvers/solvers/loopsolver.hh @@ -47,25 +47,6 @@ public: */ virtual void check() const; - - /** - * \brief Add a convergence criterion - * - * All criteria are checked after each loop. The solver loop will - * terminate once any of the supplied criteria evaluates to true. - * If you want to terminate only if several criteria are true - * you can combine criteria using the overloaded bitwise - * logical operations. - * - * Besides checking the criterion the LoopSolver will - * print the diagnostic string returned by the criterion - * in a column with the criterions header string on top. - */ - void addCriterion(const Dune::Solvers::Criterion& criterion) - { - monitors_.push_back(Dune::Solvers::Criterion(criterion)); - } - /** * \brief Add a convergence criterion * @@ -79,14 +60,14 @@ public: * print the diagnostic string returned by the criterion * in a column with the criterions header string on top. * - * This is a convenience method that just forwards all - * arguments to the constructor of Dune::Solvers::Criterion. - * Refer to the documentation of the latter for details. + * This method forward all arguments to the constructor of + * Criterion. So you can pass a Criterion or any argument + * list supported by the Criterion constructors. */ template<class... Args> - void addCriterion(const Args&... args) + void addCriterion(Args&&... args) { - monitors_.push_back(Dune::Solvers::Criterion(args...)); + monitors_.emplace_back(std::forward<Args>(args)...); } /**