Feellgood
Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Private Attributes | List of all members
algebra::iteration< T > Class Template Reference

#include <iter.h>

Public Member Functions

 iteration (const std::string name, T r, bool _noise, int _maxiter)
 
void reset (void)
 
std::string infos (void) const
 
void operator++ (int)
 
void operator++ ()
 
get_res () const
 
int get_iteration () const
 
get_rhsnorm () const
 
void set_rhsnorm (T r)
 
bool converged (T nr)
 
bool finished (T nr)
 

Public Attributes

algebra::algoStatus status
 
const T resmax
 

Protected Attributes

rhsn
 
const int maxiter
 
const bool noise
 
int nit
 
res
 
bool written
 

Private Member Functions

std::string str_status (void) const
 

Private Attributes

const std::string solver_name
 

Detailed Description

template<typename T>
class algebra::iteration< T >

monitor over the successive iterations if a value is converging or not

Constructor & Destructor Documentation

◆ iteration()

template<typename T >
algebra::iteration< T >::iteration ( const std::string  name,
r,
bool  _noise,
int  _maxiter 
)
inline

constructor

Member Function Documentation

◆ converged()

template<typename T >
bool algebra::iteration< T >::converged ( nr)
inline

monitor the convergence through a number (the norm of a vector)

◆ finished()

template<typename T >
bool algebra::iteration< T >::finished ( nr)
inline

returns true if the algo has converged according the convergence criterias through a norm value nr

◆ get_iteration()

template<typename T >
int algebra::iteration< T >::get_iteration ( ) const
inline

getter for number of iterations

◆ get_res()

template<typename T >
T algebra::iteration< T >::get_res ( ) const
inline

getter for residu res

◆ get_rhsnorm()

template<typename T >
T algebra::iteration< T >::get_rhsnorm ( ) const
inline

getter for the right hand side norm value

◆ infos()

template<typename T >
std::string algebra::iteration< T >::infos ( void  ) const
inline

return a string aggregating the status of the monitored algorithm, the number of iterations and the residu

◆ operator++() [1/2]

template<typename T >
void algebra::iteration< T >::operator++ ( )
inline

operator increment

◆ operator++() [2/2]

template<typename T >
void algebra::iteration< T >::operator++ ( int  )
inline

increment of the number of iterations

◆ reset()

template<typename T >
void algebra::iteration< T >::reset ( void  )
inline

reset all values to monitor a new algorithm exectution

◆ set_rhsnorm()

template<typename T >
void algebra::iteration< T >::set_rhsnorm ( r)
inline

setter for the right hand side norm

◆ str_status()

template<typename T >
std::string algebra::iteration< T >::str_status ( void  ) const
inlineprivate

string version of the status

Member Data Documentation

◆ maxiter

template<typename T >
const int algebra::iteration< T >::maxiter
protected

Max. number of iterations.

◆ nit

template<typename T >
int algebra::iteration< T >::nit
protected

iteration number.

◆ noise

template<typename T >
const bool algebra::iteration< T >::noise
protected

if true iterations are printed.

◆ res

template<typename T >
T algebra::iteration< T >::res
protected

last computed residu.

◆ resmax

template<typename T >
const T algebra::iteration< T >::resmax

maximum tolerated residu.

◆ rhsn

template<typename T >
T algebra::iteration< T >::rhsn
protected

Right hand side norm.

◆ solver_name

template<typename T >
const std::string algebra::iteration< T >::solver_name
private

monitored solver name

◆ status

template<typename T >
algebra::algoStatus algebra::iteration< T >::status

status of the monitored algorithm

◆ written

template<typename T >
bool algebra::iteration< T >::written
protected

true : info was written


The documentation for this class was generated from the following file: