(9)

Iter< T_ > Class Template Reference

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...
 

Detailed Description

template<class T_>
class OFELI::Iter< T_ >

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.

Author
Rachid Touzani

Member Function Documentation

◆ setMaxIter()

void setMaxIter ( int  max_it)

Set maximal number of iterations.

Parameters
[in]max_itMaximal number of iterations [Default: 100]

◆ setTolerance()

void setTolerance ( real_t  toler)

Set tolerance value for convergence.

Parameters
[in]tolerTolerance value [Default: 1.e-8]

◆ setVerbose()

void setVerbose ( int  v)

Set verbosity parameter.

Parameters
[in]vVerbosity parameter [Default: 0]