Class to drive an iterative process. More...
Public Member Functions | |
Iter () | |
Default Constructor. More... | |
Iter (int max_it, real_t toler) | |
Constructor with iteration parameters. More... | |
~Iter () | |
Destructor. | |
void | setMaxIter (int max_it) |
Set maximal number of iterations. More... | |
void | setTolerance (real_t toler) |
Set tolerance value for convergence. More... | |
void | setVerbose (int v) |
Set verbosity parameter. More... | |
bool | check (Vect< T_ > &u, const Vect< T_ > &v, int opt=2) |
Check convergence. More... | |
bool | check (T_ &u, const T_ &v) |
Check convergence for a scalar case (one equation) More... | |
Class to drive an iterative process.
This template class enables monitoring any iterative process. It simply sets default values for tolerance, maximal number of iterations and enables checking convergence using two successive iterates.
void setMaxIter | ( | int | max_it | ) |
Set maximal number of iterations.
[in] | max_it | Maximal number of iterations [Default: 100 ] |
void setTolerance | ( | real_t | toler | ) |
Set tolerance value for convergence.
[in] | toler | Tolerance value [Default: 1.e-8 ] |
void setVerbose | ( | int | v | ) |
Set verbosity parameter.
[in] | v | Verbosity parameter [Default: 0 ] |