16 #ifndef dealii_solver_control_h 17 #define dealii_solver_control_h 20 #include <deal.II/base/config.h> 21 #include <deal.II/base/subscriptor.h> 25 DEAL_II_NAMESPACE_OPEN
106 out <<
"Iterative method reported convergence failure in step " 109 <<
"This error message can indicate that you have simply not allowed " 110 <<
"a sufficiently large number of iterations for your iterative solver " 111 <<
"to converge. This often happens when you increase the size of your " 112 <<
"problem. In such cases, the last residual will likely still be very " 113 <<
"small, and you can make the error go away by increasing the allowed " 114 <<
"number of iterations when setting up the SolverControl object that " 115 <<
"determines the maximal number of iterations you allow." 117 <<
"The other situation where this error may occur is when your matrix " 118 <<
"is not invertible (e.g., your matrix has a null-space), or if you " 119 <<
"try to apply the wrong solver to a matrix (e.g., using CG for a " 120 <<
"matrix that is not symmetric or not positive definite). In these " 121 <<
"cases, the residual in the last iteration is likely going to be large." 150 const double tol = 1.e-10,
188 const double check_value);
412 const double reduce = 1.e-2,
450 const double check_value);
524 const double check_value);
579 const double check_value);
700 DEAL_II_NAMESPACE_CLOSE
double initial_value() const
Stop iteration, goal not reached.
const double last_residual
virtual State check(const unsigned int step, const double check_value)
bool history_data_enabled
const std::vector< double > & get_history_data() const
virtual ~IterationNumberControl()=default
static void declare_parameters(ParameterHandler ¶m)
unsigned int n_consecutive_iterations
double step_reduction(unsigned int step) const
double final_reduction() const
void parse_parameters(ParameterHandler ¶m)
virtual ~ReductionControl()=default
ConsecutiveControl(const unsigned int maxiter=100, const double tolerance=1.e-10, const unsigned int n_consecutive_iterations=2, const bool log_history=false, const bool log_result=false)
void clear_failure_criterion()
ConsecutiveControl & operator=(const SolverControl &c)
IterationNumberControl & operator=(const SolverControl &c)
virtual ~SolverControl()=default
static void declare_parameters(ParameterHandler ¶m)
const unsigned int last_step
unsigned int log_frequency(unsigned int)
Stop iteration, goal reached.
unsigned int m_log_frequency
double set_reduction(const double)
#define DeclException0(Exception0)
static ::ExceptionBase & ExcHistoryDataRequired()
virtual State check(const unsigned int step, const double check_value)
double relative_failure_residual
double last_value() const
double average_reduction() const
unsigned int last_step() const
IterationNumberControl(const unsigned int maxiter=100, const double tolerance=1e-12, const bool log_history=false, const bool log_result=true)
unsigned int n_converged_iterations
unsigned int max_steps() const
void enable_history_data()
double set_tolerance(const double)
ReductionControl(const unsigned int maxiter=100, const double tolerance=1.e-10, const double reduce=1.e-2, const bool log_history=false, const bool log_result=true)
virtual ~ConsecutiveControl()=default
virtual State check(const unsigned int step, const double check_value)
void parse_parameters(ParameterHandler ¶m)
std::vector< double > history_data
SolverControl(const unsigned int n=100, const double tol=1.e-10, const bool log_history=false, const bool log_result=true)
unsigned int set_max_steps(const unsigned int)
virtual State check(const unsigned int step, const double check_value)
ReductionControl & operator=(const SolverControl &c)
virtual void print_info(std::ostream &out) const
void set_failure_criterion(const double rel_failure_residual)