|
Reference documentation for deal.II version 9.2.0
|
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\)
\(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\)
\(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\)
\(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Go to the documentation of this file.
31 const double tolerance,
32 const bool m_log_history,
33 const bool m_log_result)
40 , check_failure(false)
41 , relative_failure_residual(0)
43 , m_log_history(m_log_history)
45 , m_log_result(m_log_result)
46 , history_data_enabled(false)
63 deallog <<
"Check " << step <<
"\t" << check_value << std::endl;
74 deallog <<
"Starting value " << check_value << std::endl;
80 if (check_value <=
tol)
83 deallog <<
"Convergence step " << step <<
" value " << check_value
89 if ((step >=
maxsteps) || std::isnan(check_value) ||
93 deallog <<
"Failure step " << step <<
" value " << check_value
152 const std::vector<double> &
159 "The SolverControl object was asked for the solver history "
160 "data, but there is no data. Possibly you requested the data before the "
230 const bool m_log_history,
231 const bool m_log_result)
276 deallog <<
"Convergence step " << step <<
" value " << check_value
313 const double tolerance,
314 const bool m_log_history,
315 const bool m_log_result)
329 deallog <<
"Convergence step " << step <<
" value " << check_value
345 const unsigned int n,
346 const double tolerance,
347 const unsigned int n_consecutive_iterations,
348 const bool m_log_history,
349 const bool m_log_result)
351 , n_consecutive_iterations(n_consecutive_iterations)
352 , n_converged_iterations(0)
355 ExcMessage(
"n_consecutive_iterations should be positive"));
362 , n_consecutive_iterations(1)
363 , n_converged_iterations(0)
391 ExcMessage(
"steps should be ascending integers."));
unsigned int m_log_frequency
virtual State check(const unsigned int step, const double check_value)
double get_double(const std::string &entry_name) const
IterationNumberControl(const unsigned int maxiter=100, const double tolerance=1e-12, const bool log_history=false, const bool log_result=true)
bool get_bool(const std::string &entry_name) const
double final_reduction() const
virtual State check(const unsigned int step, const double check_value) override
void declare_entry(const std::string &entry, const std::string &default_value, const Patterns::PatternBase &pattern=Patterns::Anything(), const std::string &documentation="", const bool has_to_be_set=false)
double set_reduction(const double)
void enable_history_data()
Subscriptor & operator=(const Subscriptor &)
const std::vector< double > & get_history_data() const
ReductionControl & operator=(const SolverControl &c)
static ::ExceptionBase & ExcHistoryDataRequired()
static void declare_parameters(ParameterHandler ¶m)
double last_value() const
unsigned int n_converged_iterations
double average_reduction() const
unsigned int last_step() const
@ iterate
Continue iteration.
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)
unsigned int log_frequency(unsigned int)
std::vector< double > history_data
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
static ::ExceptionBase & ExcMessage(std::string arg1)
long int get_integer(const std::string &entry_string) const
void parse_parameters(ParameterHandler ¶m)
#define DEAL_II_NAMESPACE_OPEN
double step_reduction(unsigned int step) const
bool history_data_enabled
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)
void parse_parameters(ParameterHandler ¶m)
unsigned int n_consecutive_iterations
static ::ExceptionBase & ExcInternalError()
#define Assert(cond, exc)
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)
@ failure
Stop iteration, goal not reached.
static const unsigned int invalid_unsigned_int
static void declare_parameters(ParameterHandler ¶m)
virtual State check(const unsigned int step, const double check_value) override
@ success
Stop iteration, goal reached.
ConsecutiveControl & operator=(const SolverControl &c)
double relative_failure_residual
#define DEAL_II_NAMESPACE_CLOSE
double set_tolerance(const double)
#define AssertThrow(cond, exc)
virtual State check(const unsigned int step, const double check_value) override
double initial_value() const