
Public Member Functions | |
| 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) | |
| ReductionControl (const SolverControl &c) | |
| ReductionControl & | operator= (const SolverControl &c) |
| virtual | ~ReductionControl () |
| void | parse_parameters (ParameterHandler ¶m) |
| virtual State | check (const unsigned int step, const double check_value) |
| double | reduction () const |
| double | set_reduction (const double) |
Static Public Member Functions | |
| static void | declare_parameters (ParameterHandler ¶m) |
Protected Attributes | |
| double | reduce |
| double | reduced_tol |
Specialization of SolverControl which returns success if either the specified tolerance is achieved or if the initial residual (or whatever criterion was chosen by the solver class) is reduced by a given factor. This is useful in cases where you don't want to solve exactly, but rather want to gain two digits or if the maximal number of iterations is achieved. For example: The maximal number of iterations is 20, the reduction factor is 1% und the tolerance is 0.1%. The initial residual is 2.5. The process will break if 20 iteration are comleted or the new residual is less then 2.5*1% or if it is less then 0.1%.
Definition at line 460 of file solver_control.h.
| ReductionControl::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 |
||
| ) |
Constructor. Provide the reduction factor additional to the arguments of the Control constructor.
| ReductionControl::ReductionControl | ( | const SolverControl & | c ) |
Initialize with a SolverControl object. The result will emulate SolverControl by setting reduce to zero.
| virtual ReductionControl::~ReductionControl | ( | ) | [virtual] |
Virtual destructor is needed as there are virtual functions in this class.
| ReductionControl& ReductionControl::operator= | ( | const SolverControl & | c ) |
Assign a SolverControl object to ReductionControl. The result of the assignment will emulate SolverControl by setting reduce to zero.
| static void ReductionControl::declare_parameters | ( | ParameterHandler & | param ) | [static] |
Interface to parameter file.
Reimplemented from SolverControl.
| void ReductionControl::parse_parameters | ( | ParameterHandler & | param ) |
Read parameters from file.
Reimplemented from SolverControl.
| virtual State ReductionControl::check | ( | const unsigned int | step, |
| const double | check_value | ||
| ) | [virtual] |
Decide about success or failure of an iteration. This function calls the one in the base class, but sets the tolerance to reduction * initial value upon the first iteration.
Reimplemented from SolverControl.
| double ReductionControl::reduction | ( | ) | const |
Reduction factor.
| double ReductionControl::set_reduction | ( | const | double ) |
Change reduction factor.
double ReductionControl::reduce [protected] |
Desired reduction factor.
Definition at line 535 of file solver_control.h.
double ReductionControl::reduced_tol [protected] |
Reduced tolerance. Stop iterations if either this value is achieved or if the base class indicates success.
Definition at line 543 of file solver_control.h.
documentation generated on Fri Feb 3 2012 06:04:11 by
doxygen
1.7.2