OFELI's Logo

An Object Oriented Finite Element Library

Iter< T_ > Class Template Reference

Class to drive an iterative process. More...

#include <Iter.h>

Public Member Functions

 Iter ()
 Default Constructor.
 Iter (int max_it, real_t toler)
 Constructor with iteration parameters.
 ~Iter ()
void setMaxIter (int max_it)
 Set maximal number of iterations.
void setTolerance (real_t toler)
 Set tolerance value for convergence.
void setVerbose (int v)
 Set verbosity parameter.
bool check (Vect< T_ > &u, const Vect< T_ > &v, int opt=2)
 Check convergence.
bool check (T_ &u, const T_ &v)
 Check convergence for a scalar case (one equation)

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.

Rachid Touzani

Member Function Documentation

◆ setMaxIter()

template<class T_ >
void setMaxIter ( int  max_it)

Set maximal number of iterations.

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

◆ setTolerance()

template<class T_ >
void setTolerance ( real_t  toler)

Set tolerance value for convergence.

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

◆ setVerbose()

template<class T_ >
void setVerbose ( int  v)

Set verbosity parameter.

[in]vVerbosity parameter [Default: 0]

Copyright © 1998-2024 Rachid Touzani