Diffpack Documentation


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

Precond Class Reference

base class for preconditioners for linear systems. More...

#include <Precond.h>

Inheritance diagram for Precond::

HandleId PrecAlgebraic PrecItSolver PrecML PrecNone PrecProcedure PrecJacobi PrecRILU PrecSOR PrecSSOR PrecUserDefInv PrecUserDefLU PrecUserDefMat PrecJacobiIter PrecSORIter PrecSSORIter PrecUserDefProc List of all members.

Public Methods

virtual ~Precond ()
void get (Precond_prm &precprm_) const
bool left ()
bool autoInit ()
bool precBasisIsA ()
virtual void connect (Handle(LinEqCommBlk) &communication)
virtual void receive ()
virtual bool redim (const LinEqVector &x)
virtual void init (PrecBasis &Apb)=0
virtual bool ok () const=0
virtual void apply (const LinEqVector &c, LinEqVector &d, TransposeMode tpmode=NOT_TRANSPOSED)=0
virtual int getWork (const PrecondWork work_tp=APPLY_PREC_WORK) const
virtual real getStorage () const
virtual String description () const
virtual void performance (PrecondStatistics &precStat)
virtual void get (LinEqMatrix &precmat, String &precname) const
virtual void attach (const PrecAction &precproc_)
virtual void debugPrint (Os os, int amount_of_output=1) const

Protected Methods

 Precond (const Precond_prm &p)

Protected Attributes

Handle(LinEqCommBlkcommunication
Handle(Precond_prmprecprm
bool Apb_is_A
bool init_called_once
Handle(LinEqVectorscratch
Handle(PrecActionprecproc

Detailed Description

base class for preconditioners for linear systems.

NAME: Precond - base class for preconditioners for linear systems

DESCRIPTION:

The base class describes an interface for preconditioning operations. In Diffpack, the preconditioner is a part of the linear system. The "Precond" interface is thus used from "LinEqSystem" classes.


Constructor & Destructor Documentation

Precond::Precond ( const Precond_prm & p ) [protected]
 

The only constructor accepts a parameter block of type "Precond_prm", which is used to initialize the current preconditioner object. Note that the base class constructor is accessible only to derived classes.

Precond::~Precond ( ) [virtual]
 


Member Function Documentation

void Precond::apply ( const LinEqVector & c,
LinEqVector & d,
TransposeMode tpmode = NOT_TRANSPOSED ) [pure virtual]
 

computes the result of applying the current preconditoner to a "LinEqVector" object "c". The result is returned in "d". Depending on the "TransposeMode" parameter, the preconditoner can be used as is (default) or as transposed/conjugate transposed operator.

Reimplemented in PrecAlgebraic, PrecUserDefLU, PrecUserDefInv, PrecUserDefMat, PrecRILU, PrecJacobi, PrecSOR, PrecSSOR, PrecItSolver, PrecNone, PrecProcedure, PrecUserDefProc, and PrecML.

void Precond::attach ( const PrecAction & precproc_ ) [inline, virtual]
 

permits the user to attach externally defined preconditioning actions with or without a user-supplied matrix.

Reimplemented in PrecML.

bool Precond::autoInit ( ) [inline]
 

returns "true" if the preconditioner is automatically initialized, otherwise it returns "false".

Reimplemented in PrecML.

void Precond::connect ( Handle(LinEqCommBlk) & communication ) [virtual]
 

establishes a connection between the preconditioner and a "LinEqCommBlk" communication block.

void Precond::debugPrint ( Os os,
int amount_of_output = 1 ) const [virtual]
 

String Precond::description ( ) const [virtual]
 

Reimplemented in PrecUserDefLU, PrecUserDefInv, PrecUserDefMat, PrecRILU, PrecJacobi, PrecSOR, PrecSSOR, PrecJacobiIter, PrecSORIter, PrecSSORIter, PrecNone, PrecUserDefProc, and PrecML.

void Precond::get ( LinEqMatrix & precmat,
String & precname ) const [virtual]
 

See documentation of one of the overloaded functions.

Reimplemented in PrecAlgebraic, PrecItSolver, and PrecNone.

void Precond::get ( Precond_prm & precprm_ ) const [inline]
 

returns the current set of preconditoning parameters. If the chosen preconditioner is of algebraic type, an overloaded version can be used to access the preconditioning matrix.

Reimplemented in PrecAlgebraic, PrecItSolver, and PrecNone.

real Precond::getStorage ( ) const [virtual]
 

returns the amount of storage needed for the current preconditioner.

Reimplemented in PrecAlgebraic, PrecRILU, PrecItSolver, PrecProcedure, and PrecML.

int Precond::getWork ( const PrecondWork work_tp = APPLY_PREC_WORK ) const [virtual]
 

returns the work estimate for the last performed preconditioning operation.

Reimplemented in PrecUserDefLU, PrecUserDefInv, PrecUserDefMat, PrecRILU, PrecJacobi, PrecSOR, PrecSSOR, PrecItSolver, PrecUserDefProc, and PrecML.

void Precond::init ( PrecBasis & Apb ) [pure virtual]
 

initializes the preconditioner, e.g. by computing an incomplete factorization. The function "init" should perform internal redimensioning if necessary. For algebraic preconditioners where C is based directly on A with the same sparsity pattern, C should be redimensioned by a "C.redim(A)" statement like we have for "LinEqVector" objects. The "Matrix"-heriarchy must then have a virtual makeItSimilar function (see "Vector").

Reimplemented in PrecAlgebraic, PrecUserDefLU, PrecRILU, PrecItSolver, PrecJacobiIter, PrecSORIter, PrecSSORIter, PrecNone, PrecProcedure, and PrecML.

bool Precond::left ( ) [inline]
 

returns "true" if the preconditoner is applied from the left, otherwise it returns "false".

bool Precond::ok ( ) const [pure virtual]
 

returns "true" if the preconditioner is in normal state, otherwise it returns "false".

Reimplemented in PrecAlgebraic, PrecUserDefMat, PrecItSolver, PrecNone, PrecProcedure, PrecUserDefProc, and PrecML.

void Precond::performance ( PrecondStatistics & precStat ) [virtual]
 

records preconditioning statistics in the supplied "PrecondStatistics" object. This object is usually a part of a "LinEqStatBlk" object which is used to collect and performance statistics.

Reimplemented in PrecRILU, PrecSOR, PrecSSOR, PrecItSolver, PrecSORIter, PrecSSORIter, and PrecML.

bool Precond::precBasisIsA ( ) [inline]
 

void Precond::receive ( ) [inline, virtual]
 

instructs the preconditioner to read data from the connected "LinEqCommBlk" object. By default, this function is empty, but it can be redefined for preconditioners requiring external information such as iteration parameters or estimates of the extreme eigenvalues.

bool Precond::redim ( const LinEqVector & x ) [virtual]
 

redimensions the current preconditioner to match the supplied "LinEqVector" object.

Reimplemented in PrecNone, and PrecProcedure.


Member Data Documentation

bool Precond::Apb_is_A [protected]
 

Handle(LinEqCommBlk) Precond::communication [protected]
 

bool Precond::init_called_once [protected]
 

Handle(Precond_prm) Precond::precprm [protected]
 

Handle(PrecAction) Precond::precproc [protected]
 

Handle(LinEqVector) Precond::scratch [protected]
 


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