Reference documentation for deal.II version 9.0.0
|
#include <deal.II/lac/solver_control.h>
Public Member Functions | |
IterationNumberControl (const unsigned int maxiter=100, const double tolerance=1e-12, const bool log_history=false, const bool log_result=true) | |
IterationNumberControl (const SolverControl &c) | |
IterationNumberControl & | operator= (const SolverControl &c) |
virtual | ~IterationNumberControl ()=default |
virtual State | check (const unsigned int step, const double check_value) |
Public Member Functions inherited from SolverControl | |
SolverControl (const unsigned int n=100, const double tol=1.e-10, const bool log_history=false, const bool log_result=true) | |
virtual | ~SolverControl ()=default |
void | parse_parameters (ParameterHandler ¶m) |
State | last_check () const |
double | initial_value () const |
double | last_value () const |
unsigned int | last_step () const |
unsigned int | max_steps () const |
unsigned int | set_max_steps (const unsigned int) |
void | set_failure_criterion (const double rel_failure_residual) |
void | clear_failure_criterion () |
double | tolerance () const |
double | set_tolerance (const double) |
void | enable_history_data () |
const std::vector< double > & | get_history_data () const |
double | average_reduction () const |
double | final_reduction () const |
double | step_reduction (unsigned int step) const |
void | log_history (const bool) |
bool | log_history () const |
unsigned int | log_frequency (unsigned int) |
void | log_result (const bool) |
bool | log_result () const |
Public Member Functions inherited from Subscriptor | |
Subscriptor () | |
Subscriptor (const Subscriptor &) | |
Subscriptor (Subscriptor &&) noexcept | |
virtual | ~Subscriptor () |
Subscriptor & | operator= (const Subscriptor &) |
Subscriptor & | operator= (Subscriptor &&) noexcept |
void | subscribe (const char *identifier=nullptr) const |
void | unsubscribe (const char *identifier=nullptr) const |
unsigned int | n_subscriptions () const |
void | list_subscribers () const |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Additional Inherited Members | |
Public Types inherited from SolverControl | |
enum | State { iterate = 0, success, failure } |
Static Public Member Functions inherited from SolverControl | |
static void | declare_parameters (ParameterHandler ¶m) |
static ::ExceptionBase & | ExcHistoryDataRequired () |
Static Public Member Functions inherited from Subscriptor | |
static ::ExceptionBase & | ExcInUse (int arg1, std::string arg2, std::string arg3) |
static ::ExceptionBase & | ExcNoSubscriber (std::string arg1, std::string arg2) |
Protected Attributes inherited from SolverControl | |
unsigned int | maxsteps |
double | tol |
State | lcheck |
double | initial_val |
double | lvalue |
unsigned int | lstep |
bool | check_failure |
double | relative_failure_residual |
double | failure_residual |
bool | m_log_history |
unsigned int | m_log_frequency |
bool | m_log_result |
bool | history_data_enabled |
std::vector< double > | history_data |
Specialization of SolverControl
which returns success
if a given number of iteration was performed, irrespective of the actual residual. This is useful in cases where you don't want to solve exactly, but rather want to perform a fixed number of iterations, e.g. in an inner solver. The arguments given to this class are exactly the same as for the SolverControl class and the solver terminates similarly when one of the given tolerance or the maximum iteration count were reached. The only difference to SolverControl is that the solver returns success in the latter case.
Definition at line 487 of file solver_control.h.
IterationNumberControl::IterationNumberControl | ( | const unsigned int | maxiter = 100 , |
const double | tolerance = 1e-12 , |
||
const bool | log_history = false , |
||
const bool | log_result = true |
||
) |
Constructor. Provide exactly the same arguments as the constructor of the SolverControl class.
Definition at line 314 of file solver_control.cc.
IterationNumberControl::IterationNumberControl | ( | const SolverControl & | c | ) |
Initialize with a SolverControl object. The result will emulate SolverControl by setting the reduction target to zero.
|
virtualdefault |
Virtual destructor is needed as there are virtual functions in this class.
IterationNumberControl& IterationNumberControl::operator= | ( | const SolverControl & | c | ) |
Assign a SolverControl object to ReductionControl. The result of the assignment will emulate SolverControl by setting the reduction target to zero.
|
virtual |
Decide about success or failure of an iteration. This function bases success solely on the fact if a given number of iterations was reached or the check value reached exactly zero.
Reimplemented from SolverControl.
Definition at line 325 of file solver_control.cc.