16 #include <deal.II/base/logstream.h> 17 #include <deal.II/base/parameter_handler.h> 18 #include <deal.II/lac/solver_control.h> 23 DEAL_II_NAMESPACE_OPEN
29 const double tolerance,
30 const bool m_log_history,
31 const bool m_log_result)
38 relative_failure_residual(0),
40 m_log_history(m_log_history),
42 m_log_result(m_log_result),
43 history_data_enabled(false)
55 const double check_value)
68 deallog <<
"Check " << step <<
"\t" << check_value << std::endl;
79 deallog <<
"Starting value " << check_value << std::endl;
85 if (check_value <=
tol)
88 deallog <<
"Convergence step " << step
89 <<
" value " << check_value << std::endl;
100 deallog <<
"Failure step " << step
101 <<
" value " << check_value << std::endl;
250 const double check_value)
268 deallog <<
"Convergence step " << step
269 <<
" value " << check_value << std::endl;
315 const double check_value)
322 deallog <<
"Convergence step " << step
323 <<
" value " << check_value << std::endl;
334 DEAL_II_NAMESPACE_CLOSE
double initial_value() const
Stop iteration, goal not reached.
long int get_integer(const std::string &entry_string) const
virtual State check(const unsigned int step, const double check_value)
bool history_data_enabled
Subscriptor & operator=(const Subscriptor &)
static void declare_parameters(ParameterHandler ¶m)
double step_reduction(unsigned int step) const
double final_reduction() const
void parse_parameters(ParameterHandler ¶m)
virtual ~IterationNumberControl()
double get_double(const std::string &entry_name) const
static void declare_parameters(ParameterHandler ¶m)
unsigned int log_frequency(unsigned int)
Stop iteration, goal reached.
#define Assert(cond, exc)
unsigned int m_log_frequency
double set_reduction(const double)
virtual ~ReductionControl()
bool is_nan(const double x)
bool get_bool(const std::string &entry_name) const
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)
void declare_entry(const std::string &entry, const std::string &default_value, const Patterns::PatternBase &pattern=Patterns::Anything(), const std::string &documentation=std::string())
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 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)