NAME
CMRelMixResidual - relative convergence monitor based on mixed
residuals
INCLUDE
include "ConvMonitor.h"
SYNTAX
//-----------------------------------------------------------------------------
class CMRelMixResidual : public CMAbsResidual
//-----------------------------------------------------------------------------
{
friend class ConvMonitorList;
protected:
// True if basevalue uses (preconditioned) rhs rather than v^{0}
bool rel_to_rhs;
Handle(LinEqVector) r;
public:
CMRelMixResidual (const ConvMonitor_prm& p)
: CMAbsResidual (p) { rel_to_rhs = p.rel_to_rhs; }
CMRelMixResidual (const real conv_tolerance = 1.0e-4,
const Residual_type residual_tp = ORIGINAL_RES,
const Norm_type norm_tp = l2,
const int chunk_size = 100);
~CMRelMixResidual () {}
virtual void getScaling (String& scale) const;
virtual real getScaling () const;
virtual void init (Handle(LinEqCommBlk)& communication);
virtual bool satisfied();
virtual void performance (ConvStatistics& convStat);
virtual String description () const;
virtual void print (Os os) const;
CLASS_INFO
};
KEYWORDS
iterative methods, relative stopping criterion, convergence moni
tor, residual
DESCRIPTION
Monitors the behaviour of the unpreconditioned residual r com
pared to a possibly preconditioned one. Both vectors are obtained
from an IterativeSolver via a LinEqCommBlk object, i.e. no inter
nal storage. The convergence test is relative, `$Sequals one of
the kth residuals , or and S is a scaling obtained from spectral
properties (if this information is available).
Note that if preconditioned residuals are used, the precondition
ing operator should be SPD to provide a uniformly positive mea
sure.
CONSTRUCTORS AND INITIALIZATION
Same as CMAbsResidual.
MEMBER FUNCTIONS
Same as CMAbsResidual.
SEE ALSO
class CMAbsResidual, class IterativeSolver, class ConvMoni
torList.
AUTHOR
Are Magnus Bruaset, SINTEF Applied Mathematics.