Diffpack Documentation


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

KrylovItSolver Class Reference

base class for Krylov subspace iterations. More...

#include <LinEqSolver.h>

Inheritance diagram for KrylovItSolver::

IterativeSolver LinEqSolver HandleId BiCGStab CGS ConjGrad GMRES MinRes Orthomin SymMinRes Symmlq TFQMR List of all members.

Public Methods

 ~KrylovItSolver ()
virtual bool ok () const
virtual bool solve (LinEqSystem &system)
virtual void debugPrint (Os os, int amount_of_output=1) const
virtual String getCategory () const
virtual bool inCategory (const String &baseclass_name) const

Protected Methods

 KrylovItSolver ()
 KrylovItSolver (const LinEqSolver_prm &pm)
void prepare (Residual_type residual_tp)
void grabResidualVector (Residual_type residual_tp, Handle(LinEqVector) &v)
void initResiduals ()
virtual void init (const LinEqPrecMode algprec_mode)
virtual void restart ()
virtual bool redim (LinEqSystem &system)
virtual void initCommBlk ()

Protected Attributes

Handle(LinEqVectorr
Handle(LinEqVectors
Handle(LinEqVectorz
bool use_svector
bool use_zvector
Handle(LinEqVectorprev_r
Handle(LinEqVectorprev_s
Handle(LinEqVectorprev_z

Detailed Description

base class for Krylov subspace iterations.

NAME: KrylovItSolver - base class for Krylov subspace iterations

DESCRIPTION:

This class is the base for any Krylov subspace iteration, where storage of residual vectors is required.


Constructor & Destructor Documentation

KrylovItSolver::KrylovItSolver ( ) [protected]
 

See class "LinEqSolver".

KrylovItSolver::KrylovItSolver ( const LinEqSolver_prm & pm ) [protected]
 

See documentation of one of the overloaded constructor.

KrylovItSolver::~KrylovItSolver ( )
 


Member Function Documentation

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

prints detailed information on the last solve. This is particularly useful for debugging purposes.

Reimplemented from IterativeSolver.

String KrylovItSolver::getCategory ( ) const [virtual]
 

returns a string indicating the current solver category, e.g., "DirectSolver" or "IterativeSolver".

Reimplemented from IterativeSolver.

void KrylovItSolver::grabResidualVector ( Residual_type residual_tp,
Handle(LinEqVector) & v ) [protected]
 

rebinds the handle "v" to refer the solver''s internal residual vector defined by the argument "residual_tp". Typically, "v" is rebound to the standard residual "r" when "residual_tp" has the value "ORIGINAL_RES".

bool KrylovItSolver::inCategory ( const String & baseclass_name ) const [virtual]
 

checks if the current solver belongs to the specified category. This function is useful when one wants to cast a "LinEqSolver" object to some derived type in order to reach specialized functionality. The test on "inCategory" should then preceed the casting.

Reimplemented from IterativeSolver.

void KrylovItSolver::init ( const LinEqPrecMode algprec_mode ) [protected, virtual]
 

to be called by "solve" before starting the iteration. This implies redimensioning of internal data structures and other bookeeping details to ensure the flexibility of the "IterativeSolver" framework. (For internal use only).

Reimplemented from IterativeSolver.

void KrylovItSolver::initCommBlk ( ) [protected, virtual]
 

initializes the communication block needed for communication with attached "LinEqSystem", "EigenEstimator", "Precond" and "ConvMonitor" objects. This function is typically called by "init". (For internal use only).

Reimplemented from IterativeSolver.

Reimplemented in ConjGrad, and TFQMR.

void KrylovItSolver::initResiduals ( ) [protected]
 

allocate and compute initial residuals.

bool KrylovItSolver::ok ( ) const [virtual]
 

returns "true" if the solver is in a healthy state, i.e., if a "LinEqSystem" object is attached. If not, the value "false" is returned.

Reimplemented from IterativeSolver.

Reimplemented in BiCGStab, CGS, ConjGrad, GMRES, MinRes, Orthomin, SymMinRes, Symmlq, and TFQMR.

void KrylovItSolver::prepare ( Residual_type residual_tp ) [protected]
 

sets up the storage scheme for residual vectors based on the argument.

bool KrylovItSolver::redim ( LinEqSystem & system ) [protected, virtual]
 

redimensions internal storage based on the given "LinEqSystem" object. This function is typically called from "solve".

Reimplemented from LinEqSolver.

Reimplemented in BiCGStab, CGS, ConjGrad, GMRES, MinRes, Orthomin, Symmlq, and TFQMR.

void KrylovItSolver::restart ( ) [protected, virtual]
 

Reimplemented from IterativeSolver.

bool KrylovItSolver::solve ( LinEqSystem & system ) [virtual]
 

solves the linear system given as argument. There is no need for explicit redimensioning of internal data structure, this is automatically done by "solve".

Reimplemented from LinEqSolver.

Reimplemented in BiCGStab, CGS, ConjGrad, GMRES, MinRes, Orthomin, SymMinRes, Symmlq, and TFQMR.


Member Data Documentation

Handle(LinEqVector) KrylovItSolver::prev_r [protected]
 

Handle(LinEqVector) KrylovItSolver::prev_s [protected]
 

Handle(LinEqVector) KrylovItSolver::prev_z [protected]
 

Handle(LinEqVector) KrylovItSolver::r [protected]
 

Handle(LinEqVector) KrylovItSolver::s [protected]
 

bool KrylovItSolver::use_svector [protected]
 

bool KrylovItSolver::use_zvector [protected]
 

Handle(LinEqVector) KrylovItSolver::z [protected]
 


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