Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

ConvMonitor Class Reference

base class for convergence monitors. More...

#include <ConvMonitor.h>

Inheritance diagram for ConvMonitor::

HandleId CMAbsRefSolution CMAbsResidual CMAbsTrueResidual CMAdaptCGprm ConvMonSeq CMRelRefSolution CMAbsMixResidual CMRelMixResidual CMRelResidual CMRelResidualUB CMRelResSolution CMRelTrueResidual CMAbsSeqResidual CMAbsSeqSolution List of all members.

Public Methods

 ConvMonitor (const ConvMonitor_prm &p)
 ConvMonitor ()
 ConvMonitor (real conv_tolerance, Norm_type norm_tp, int chunk_size)
void redim ()
virtual void getScaling (String &scale) const
virtual real getScaling () const
virtual ~ConvMonitor ()
virtual void init (Handle(LinEqCommBlk) &communication)
virtual bool ok () const
virtual bool satisfied ()
void setTolerance (const real user_tol)
real getTolerance () const
bool userDefinedBaseValue ()
void setBaseValue (real user_base)
real getBaseValue ()
void activateMonitor (const bool onoff)
void activateCriterion (const bool onoff)
bool activeMonitor () const
bool activeCriterion () const
real getTestValue () const
real getMinValue () const
void getMinValue (real &min_value, int &min_iter) const
virtual int getWork () const
virtual real getStorage () const
virtual bool hasResidualType () const
virtual Residual_type getResidualType () const
virtual void performance (ConvStatistics &convStat)
virtual String description () const
void plotMonitorData (CurvePlotFile &file, const String &title, const String &comment, bool logplot=true)
void popUpMonitorData (const String &title, const String &geometry)
virtual void print (Os os) const
bool operator!= (const ConvMonitor &monitor)
bool operator== (const ConvMonitor &monitor)
bool operator< (const ConvMonitor &)
void attachCommAdm (const SubdCommAdm &adm_)
NUMT inner (LinEqVector &x, LinEqVector &y)

Protected Attributes

Handle(LinEqCommBlkcommunication
bool monitor
bool criterion
bool append
bool relopIsAnd
Norm_type norm_tp
real conv_tolerance
real base_value
real tst_value
bool user_defined_base
bool runtime_plot
bool use_eig_info
bool use_external_value
real* external_value
bool curr_is_internal
Handle(LinEqVectorcurr_vec
int chunk_size
int hpt
int hmax
VecSimple(real) history
Handle(SubdCommAdmcomm_adm

Friends

class  ConvMonitorList
Osoperator<< (Os &os, ConvMonitor &monitor)

Detailed Description

base class for convergence monitors.

NAME: ConvMonitor - base class for convergence monitors

DESCRIPTION:

The base class describes an interface for convergence monitors based on a single vector, e.g. the residual vector "r". The vector to be monitored may be allocated internally if this entity is not already allocated by the iterative solver and communicated through a "LinEqCommBlk". If the flag "use_eig_info" is set, the monitor will try to use spectral information from the "LinEqCommBlk" to scale the test value, see the member function "getScaling". If the same data block also contains the precomputed "l2" norm of the residual vector used by the monitor, this value may be imported through "external_value". If this information is used, the flag "use_external_value" is raised.

Depending on the flags "monitor" and "criterion", the present convergence monitor will record the convergence history and/or act as a stopping criterion. From the viewpoint of the "IterativeSolver", a collection of convegence monitors is administered by a "ConvMonitorList".


Constructor & Destructor Documentation

ConvMonitor::ConvMonitor ( const ConvMonitor_prm & p )
 

Construction by a "ConvMonitor_prm" object or by supplying a maximum tolerance "conv_tolerance" and a "Norm_type" (defaults to "l2").

ConvMonitor::ConvMonitor ( )
 

See documentation of one of the overloaded constructor.

ConvMonitor::ConvMonitor ( real conv_tolerance,
Norm_type norm_tp,
int chunk_size )
 

See documentation of one of the overloaded constructor.

ConvMonitor::~ConvMonitor ( ) [virtual]
 


Member Function Documentation

void ConvMonitor::activateCriterion ( const bool onoff ) [inline]
 

allows the user to switch the convergence test mode on/off depending on the value of the boolean argument.

void ConvMonitor::activateMonitor ( const bool onoff )
 

allows the user to switch the recording of convergence history on/off depending on the value of the boolean argument.

bool ConvMonitor::activeCriterion ( ) const [inline]
 

returns the current criterion state (on/off).

bool ConvMonitor::activeMonitor ( ) const [inline]
 

returns the current monitor state (on/off).

void ConvMonitor::attachCommAdm ( const SubdCommAdm & adm_ )
 

String ConvMonitor::description ( ) const [virtual]
 

Reimplemented in CMAbsResidual, CMAbsTrueResidual, CMRelResidual, CMRelTrueResidual, CMRelResidualUB, CMRelMixResidual, CMAbsMixResidual, CMRelResSolution, CMAbsSeqResidual, CMAbsSeqSolution, CMRelSeqResidual, CMRelSeqSolution, CMAbsRefSolution, CMRelRefSolution, and CMAdaptCGprm.

real ConvMonitor::getBaseValue ( ) [inline]
 

returns the current base value.

void ConvMonitor::getMinValue ( real & min_value,
int & min_iter ) const
 

See documentation of one of the overloaded functions.

real ConvMonitor::getMinValue ( ) const
 

minimum test value that occurred during the iteration.

Residual_type ConvMonitor::getResidualType ( ) const [inline, virtual]
 

Reimplemented in CMAbsResidual, CMAbsTrueResidual, and CMAbsSeqResidual.

real ConvMonitor::getScaling ( ) const [inline, virtual]
 

Reimplemented in CMRelResidual, CMRelTrueResidual, CMRelResidualUB, CMRelMixResidual, CMAbsMixResidual, and CMRelResSolution.

void ConvMonitor::getScaling ( String & scale ) const [inline, virtual]
 

Reimplemented in CMRelResidual, CMRelTrueResidual, CMRelResidualUB, CMRelMixResidual, CMAbsMixResidual, and CMRelResSolution.

real ConvMonitor::getStorage ( ) const [virtual]
 

estimate storage expenses for this monitor.

Reimplemented in ConvMonSeq, CMAbsRefSolution, and CMAdaptCGprm.

real ConvMonitor::getTestValue ( ) const [inline]
 

return latest test value.

real ConvMonitor::getTolerance ( ) const [inline]
 

return the current tolerance value used in the convergence test.

int ConvMonitor::getWork ( ) const [virtual]
 

estimate work expenses for this monitor.

Reimplemented in CMAdaptCGprm.

bool ConvMonitor::hasResidualType ( ) const [inline, virtual]
 

Reimplemented in CMAbsResidual, CMAbsTrueResidual, and CMAbsSeqResidual.

void ConvMonitor::init ( Handle(LinEqCommBlk) & communication ) [virtual]
 

set up communication link via the "LinEqCommBlk" object referred to by "communication".

Reimplemented in CMAbsResidual, CMAbsTrueResidual, CMRelResidual, CMRelTrueResidual, CMRelResidualUB, CMRelMixResidual, CMAbsMixResidual, CMRelResSolution, CMAbsSeqResidual, CMAbsSeqSolution, CMRelSeqResidual, CMRelSeqSolution, CMAbsRefSolution, CMRelRefSolution, and CMAdaptCGprm.

NUMT ConvMonitor::inner ( LinEqVector & x,
LinEqVector & y )
 

bool ConvMonitor::ok ( ) const [virtual]
 

check current state.

Reimplemented in ConvMonSeq, CMAbsRefSolution, and CMAdaptCGprm.

bool ConvMonitor::operator!= ( const ConvMonitor & monitor )
 

bool ConvMonitor::operator< ( const ConvMonitor & ) [inline]
 

bool ConvMonitor::operator== ( const ConvMonitor & monitor )
 

void ConvMonitor::performance ( ConvStatistics & convStat ) [virtual]
 

fill out relevant parts of a "LinEqStatBlk" object for performance report.

Reimplemented in CMAbsResidual, CMAbsTrueResidual, CMRelResidual, CMRelTrueResidual, CMRelResidualUB, CMRelMixResidual, CMAbsMixResidual, and CMAbsSeqResidual.

void ConvMonitor::plotMonitorData ( CurvePlotFile & file,
const String & title,
const String & comment,
bool logplot = true )
 

make a plot of this monitor''s history.

void ConvMonitor::popUpMonitorData ( const String & title,
const String & geometry )
 

pop up a plot of this monitor''s history on the screen.

void ConvMonitor::print ( Os os ) const [virtual]
 

Reimplemented in ConvMonSeq, CMAbsResidual, CMAbsTrueResidual, CMRelResidual, CMRelTrueResidual, CMRelResidualUB, CMRelMixResidual, CMAbsMixResidual, and CMAbsSeqResidual.

void ConvMonitor::redim ( )
 

bool ConvMonitor::satisfied ( ) [virtual]
 

monitor the test value and return true if the condition is met.

Reimplemented in ConvMonSeq, CMAbsResidual, CMAbsTrueResidual, CMRelMixResidual, CMAbsMixResidual, CMRelResSolution, CMRelSeqResidual, CMRelSeqSolution, CMAbsRefSolution, and CMAdaptCGprm.

void ConvMonitor::setBaseValue ( real user_base )
 

assigns the base value given by the argument "user_base", if user-defined values are allowed. If not, a warning message is given.

void ConvMonitor::setTolerance ( const real user_tol ) [inline]
 

allows the user to change the tolerance to be used for the convergence test.

bool ConvMonitor::userDefinedBaseValue ( ) [inline]
 

returns "true" if the user is allowed to explicitly set the base value.


Friends And Related Function Documentation

class ConvMonitorList [friend]
 

Reimplemented in ConvMonSeq, CMAbsResidual, CMAbsTrueResidual, CMRelResidual, CMRelTrueResidual, CMRelResidualUB, CMRelMixResidual, CMAbsMixResidual, CMRelResSolution, CMAbsSeqResidual, CMAbsSeqSolution, CMRelSeqResidual, CMRelSeqSolution, CMAbsRefSolution, CMRelRefSolution, and CMAdaptCGprm.

Os & operator<< ( Os & os,
ConvMonitor & monitor ) [friend]
 


Member Data Documentation

bool ConvMonitor::append [protected]
 

real ConvMonitor::base_value [protected]
 

int ConvMonitor::chunk_size [protected]
 

Handle(SubdCommAdm) ConvMonitor::comm_adm [protected]
 

Handle(LinEqCommBlk) ConvMonitor::communication [protected]
 

real ConvMonitor::conv_tolerance [protected]
 

bool ConvMonitor::criterion [protected]
 

bool ConvMonitor::curr_is_internal [protected]
 

Handle(LinEqVector) ConvMonitor::curr_vec [protected]
 

real * ConvMonitor::external_value [protected]
 

VecSimple(real) ConvMonitor::history [protected]
 

int ConvMonitor::hmax [protected]
 

int ConvMonitor::hpt [protected]
 

bool ConvMonitor::monitor [protected]
 

Norm_type ConvMonitor::norm_tp [protected]
 

bool ConvMonitor::relopIsAnd [protected]
 

bool ConvMonitor::runtime_plot [protected]
 

real ConvMonitor::tst_value [protected]
 

bool ConvMonitor::use_eig_info [protected]
 

bool ConvMonitor::use_external_value [protected]
 

bool ConvMonitor::user_defined_base [protected]
 


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.