* maximum number of iteration
* steps before failure and the
* tolerance to determine success
- * of the iteration. */
- SolverControl (const unsigned int n, const double tol);
+ * of the iteration.
+ *
+ * #log_history# specifies whether
+ * the history (i.e. the value to
+ * be checked and the number of
+ * the iteration step) shall be
+ * printed to #deallog# stream.
+ * Default is: do not print.
+ */
+ SolverControl (const unsigned int n, const double tol,
+ const bool log_history = false);
/**
* Decide about success or failure
/**
* Prescribed tolerance to be achieved.
*/
- const double tol;
+ const double tol;
/**
* Last value of the convergence criterion.
*/
- double lvalue;
+ double lvalue;
/**
* Last step.
*/
- unsigned int lstep;
+ unsigned int lstep;
+
+ /**
+ * Log convergence history to #deallog#?
+ */
+ const bool log_history;
};
SolverControl::SolverControl (const unsigned int maxiter,
- const double tolerance) :
+ const double tolerance,
+ const bool log_history) :
maxsteps(maxiter),
tol(tolerance),
lvalue(1.e300),
- lstep(0)
+ lstep(0),
+ log_history(log_history)
{};
SolverControl::check (const unsigned int step,
const double check_value)
{
- deallog << "Check " << step << "\t" << check_value << endl;
+ if (log_history)
+ deallog << "Check " << step << "\t" << check_value << endl;
lstep = step;
lvalue = check_value;