suanPan
Converger Class Referenceabstract

The Converger class handles converger test to indicate if the iteration converges according to various rules. More...

#include <Converger.h>

Inheritance diagram for Converger:
Collaboration diagram for Converger:

Public Member Functions

 Converger (unsigned=0, double=1E-8, unsigned=10, bool=false)
 the complete constructor. More...
 
 Converger (const Converger &)=default
 
 Converger (Converger &&)=default
 
Convergeroperator= (const Converger &)=delete
 
Convergeroperator= (Converger &&)=delete
 
 ~Converger () override=default
 
virtual int initialize ()
 
virtual unique_ptr< Convergerget_copy ()=0
 
void set_tolerance (double)
 method to set tolerance. More...
 
double get_tolerance () const
 method to return tolerance. More...
 
void set_max_iteration (unsigned)
 
unsigned get_max_iteration () const
 
void set_domain (const weak_ptr< DomainBase > &)
 method to set DomainBase. More...
 
const weak_ptr< DomainBase > & get_domain () const
 method to return DomainBase. More...
 
virtual void set_error (double)
 method to set error. More...
 
double get_error () const
 method to return error. More...
 
virtual void set_conv_flag (bool)
 method to set conv_flag. More...
 
bool get_conv_flag () const
 method to return conv_flag. More...
 
virtual bool is_converged (unsigned)=0
 
- Public Member Functions inherited from Tag
 Tag (unsigned=0)
 
 Tag (const Tag &)=default
 
 Tag (Tag &&)=default
 
Tagoperator= (const Tag &)=delete
 
Tagoperator= (Tag &&)=delete
 
virtual ~Tag ()=default
 
void set_tag (unsigned) const
 
unsigned get_tag () const
 
void enable ()
 
void disable ()
 
void guard ()
 
void unguard ()
 
bool is_active () const
 
bool is_guarded () const
 
virtual void print ()
 

Protected Member Functions

vec get_residual () const
 
bool is_print () const
 method to return print_flag. More...
 

Detailed Description

The Converger class handles converger test to indicate if the iteration converges according to various rules.

The class stores a pointer factory pointed to the Workshop and get information from this Workshop. The tolerance and error are stored independently so that the Workshop will not be modified.

The class further provides a print_flag to indicate if the test information should be printed out.

Author
tlc
Date
15/09/2017
Version
0.2.1

Constructor & Destructor Documentation

◆ Converger() [1/3]

Converger::Converger ( unsigned  T = 0,
double  E = 1E-8,
unsigned  M = 10,
bool  P = false 
)
explicit

the complete constructor.

Parameters
Tunique_tag
Etolerance
Mmaximum_iteration
Pprint_flag

◆ Converger() [2/3]

Converger::Converger ( const Converger )
default

◆ Converger() [3/3]

Converger::Converger ( Converger &&  )
default

◆ ~Converger()

Converger::~Converger ( )
overridedefault

Member Function Documentation

◆ get_conv_flag()

bool Converger::get_conv_flag ( ) const

method to return conv_flag.

Returns
conv_flag
Here is the caller graph for this function:

◆ get_copy()

◆ get_domain()

const weak_ptr< DomainBase > & Converger::get_domain ( ) const

method to return DomainBase.

Returns
DomainBase
Here is the caller graph for this function:

◆ get_error()

double Converger::get_error ( ) const

method to return error.

Returns
error
Here is the caller graph for this function:

◆ get_max_iteration()

unsigned Converger::get_max_iteration ( ) const
Here is the caller graph for this function:

◆ get_residual()

vec Converger::get_residual ( ) const
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_tolerance()

double Converger::get_tolerance ( ) const

method to return tolerance.

Returns
tolerance
Here is the caller graph for this function:

◆ initialize()

int Converger::initialize ( )
virtual

Reimplemented in LogicConverger.

◆ is_converged()

virtual bool Converger::is_converged ( unsigned  )
pure virtual

◆ is_print()

bool Converger::is_print ( ) const
protected

method to return print_flag.

Returns
print_flag
Here is the caller graph for this function:

◆ operator=() [1/2]

Converger & Converger::operator= ( const Converger )
delete

◆ operator=() [2/2]

Converger & Converger::operator= ( Converger &&  )
delete

◆ set_conv_flag()

void Converger::set_conv_flag ( bool  C)
virtual

method to set conv_flag.

Parameters
Cconv_flag
Here is the caller graph for this function:

◆ set_domain()

void Converger::set_domain ( const weak_ptr< DomainBase > &  D)

method to set DomainBase.

Parameters
DDomainBase

◆ set_error()

void Converger::set_error ( double  E)
virtual

method to set error.

Parameters
Eerror
Here is the caller graph for this function:

◆ set_max_iteration()

void Converger::set_max_iteration ( unsigned  M)

◆ set_tolerance()

void Converger::set_tolerance ( double  T)

method to set tolerance.

Parameters
Ttolerance

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