*/
State last_check() const;
+ /**
+ * Return the initial convergence
+ * criterion.
+ */
+ double initial_value() const;
+
/**
* Return the convergence value of last
* iteration step for which @p check was
*/
State lcheck;
+ /**
+ * Initial value.
+ */
+ double initial_val;
+
/**
* Last value of the convergence criterion.
*/
virtual State check (const unsigned int step,
const double check_value);
- /**
- * Return the initial convergence
- * criterion.
- */
- double initial_value() const;
-
/**
* Reduction factor.
*/
*/
double reduce;
- /**
- * Initial value.
- */
- double initial_val;
-
/**
* Reduced tolerance. Stop iterations
* if either this value is achieved
SolverControl::check (const unsigned int step,
const double check_value)
{
+ // if this is the first time we
+ // come here, then store the
+ // residual for later comparisons
+ if (step==0)
+ initial_val = check_value;
+
if (m_log_history && ((step % m_log_frequency) == 0))
deallog << "Check " << step << "\t" << check_value << std::endl;
}
+double
+SolverControl::initial_value() const
+{
+ return initial_val;
+}
+
+
double
SolverControl::last_value() const
{
{}
-double
-ReductionControl::initial_value() const {
- return initial_val;
-}
-
-
SolverControl::State
ReductionControl::check (const unsigned int step,
const double check_value)