Public Member Functions | Protected Attributes | List of all members
Seldon::Iteration< Titer > Class Template Reference

Class containing parameters for an iterative resolution. More...

#include <Iterative.hxx>

Public Member Functions

 Iteration ()
 Default constructor.
 
 Iteration (int max_iteration, const Titer &tol)
 Constructor with maximum number of iterations and stopping criterion.
 
 Iteration (const Iteration< Titer > &outer)
 Copy constructor.
 
int GetTypeSolver () const
 Returns the type of solver.
 
int GetRestart () const
 Returns the restart parameter.
 
Titer GetFactor () const
 Returns used coefficient to compute relative residual.
 
Titer GetTolerance () const
 Returns stopping criterion.
 
int GetNumberIteration () const
 Returns the number of iterations.
 
void SetSolver (int type_resolution, int param_restart, int type_prec)
 Changes the type of solver and preconditioning.
 
void SetRestart (int m)
 Changes the restart parameter.
 
void SetTolerance (Titer stopping_criterion)
 Changes the stopping criterion.
 
void SetMaxNumberIteration (int max_iteration)
 Changes the maximum number of iterations.
 
void SetNumberIteration (int nb)
 Changes the number of iterations.
 
void ShowMessages ()
 Sets to a normal display (residual each 100 iterations)
 
void ShowFullHistory ()
 Sets to a complete display (residual each iteration)
 
void SaveFullHistory (const string &file)
 History of residuals is printed in a file.
 
void HideMessages ()
 Doesn't display any information.
 
template<class Vector1 >
int Init (const Vector1 &r)
 Initialization with the right hand side.
 
bool First () const
 Returns true if it is the first iteration.
 
bool IsInitGuess_Null () const
 Returns true if the initial guess is null.
 
void SetInitGuess (bool type)
 informs if the initial guess is null
 
template<class Vector1 >
bool Finished (const Vector1 &r) const
 Returns true if the iterative solver has reached its end.
 
bool Finished (const Titer &r) const
 Returns true if the iterative solver has reached its end.
 
void Fail (int i, const string &s)
 Informs of a failure in the iterative solver.
 
Iterationoperator++ (void)
 Increment the number of iterations.
 
int ErrorCode ()
 Returns the error code (if an error occured)
 
template<class T1 , class Matrix1 , class Vector1 >
void MltAdd (const T1 &alpha, const Matrix1 &A, const Vector1 &x, const T1 &beta, Vector1 &y)
 Computes y = beta y + alpha A x.
 
template<class Matrix1 , class Vector1 >
void Mlt (const Matrix1 &A, const Vector1 &x, Vector1 &y)
 Computes y = A x.
 
template<class Matrix1 , class Vector1 >
void Mlt (const class_SeldonTrans &trans, const Matrix1 &A, const Vector1 &x, Vector1 &y)
 Computes y = A x or y = A^T x.
 

Protected Attributes

Titer tolerance
 stopping criterion
 
Titer facteur_reste
 inverse of norm of first residual
 
int max_iter
 maximum number of iterations
 
int nb_iter
 number of iterations
 
int error_code
 error code returned by iterative solver
 
bool fail_convergence
 true if the iterative solver has converged print level
 
int print_level
 
bool init_guess_null
 true if initial guess is null
 
int type_solver
 iterative solver used
 
int parameter_restart
 restart parameter (for Gmres and Gcr)
 
int type_preconditioning
 preconditioner used
 
string file_name_history
 

Detailed Description

template<class Titer>
class Seldon::Iteration< Titer >

Class containing parameters for an iterative resolution.

Titer is the precision (float or double), the solved linear system can be real or complex

Definition at line 59 of file Iterative.hxx.

Member Data Documentation

◆ print_level

template<class Titer >
int Seldon::Iteration< Titer >::print_level
protected

0 -> no display 1 -> displays residual after each 100 iterations 6 -> displays residual after each iteration

Definition at line 74 of file Iterative.hxx.


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