HLIBpro  1.2
Public Member Functions | Friends | List of all members
TSolver::TInfo Struct Reference

datatype to share iteration history

#include <TSolver.hh>

Public Member Functions

 TInfo (const bool store_hist=false, const bool print=false)
bool has_data () const
 return true if convergence information is present
const String & solver () const
 return solver name
bool converged () const
 return true, if iteration has converged
bool diverged () const
 return true, if iteration has diverged
size_t n_iter () const
 return number of iteration steps
real conv_rate () const
 return convergence rate
real res_norm () const
 return current residual norm
const std::list< hist_t > & history () const
 return iteration history data
void append (const uint it, const real res_norm)
void set_solver (const String &name)
 set solver name
void set_converged (const bool b)
 set convergence status
void set_diverged (const bool b)
 set divergence status
void set_n_iter (const uint n)
 set number of iteration steps
void set_conv_rate (const real conv)
 set convergence rate
void set_res_norm (const real norm)
 set current residual norm
void reset ()
 reset all data
String to_string () const
 convert data in information object to string
void print_gnuplot (std::ostream &os)
 write history in Gnuplot format to stream

Friends

std::ostream & operator<< (std::ostream &os, const TInfo &info)
 stream output

Constructor & Destructor Documentation

TInfo ( const bool  store_hist = false,
const bool  print = false 
)

constructor and store history if store_hist is true and print history if print is true respectively

Member Function Documentation

void append ( const uint  it,
const real  res_norm 
)

append data for single iteration step to history (if set so) and update internal iteration data