Diffpack Documentation


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

LinEqSolver Class Reference

abstract base class for the hierarchy of linear solvers. More...

#include <LinEqSolver.h>

Inheritance diagram for LinEqSolver::

HandleId DirectSolver IterativeSolver AMG GaussElim BasicItSolver KrylovItSolver Jacobi MLIter SOR SSOR BiCGStab CGS ConjGrad GMRES MinRes Orthomin SymMinRes Symmlq TFQMR List of all members.

Public Methods

virtual ~LinEqSolver ()
virtual bool ok () const=0
virtual String prm2name () const
virtual void name2prm (LinEqSolver_prm &prm, const String &name)
virtual String description () const
real getCPUtime () const
virtual int getWork (const LinEqSysWork work_tp=TOTAL_WORK) const=0
virtual real getStorage (const LinEqSysStorage storage_tp=TOTAL_STORAGE) const=0
virtual void performance (LinEqStatBlk &performance_status)
virtual bool solve (LinEqSystem &system)=0
virtual void debugPrint (Os os, int amount_of_output=1) const=0
virtual String getCategory () const=0
virtual bool inCategory (const String &baseclass_name) const

Protected Methods

void startTime ()
void stopTime ()
 LinEqSolver ()
 LinEqSolver (const LinEqSolver_prm &p)
virtual bool redim (LinEqSystem &system)

Protected Attributes

Handle(LinEqSolver_prmslvprm
Handle(LinEqSystemmsys
int alg_work
real alg_storage
real start_time
real stop_time
CPUclock cl
bool building_framework

Detailed Description

abstract base class for the hierarchy of linear solvers.

NAME: LinEqSolver - abstract base class for the hierarchy of linear solvers

DESCRIPTION:

This class is the generic interface to all linear solvers, direct as well as iterative ones.


Constructor & Destructor Documentation

LinEqSolver::LinEqSolver ( ) [protected]
 

There are two constructors, one accepting a "LinEqSolver_prm" object used to initialize the solver, and one without arguments. Use of the latter constructor implies default parameter setting, which may differ depending on the actual solver.

LinEqSolver::LinEqSolver ( const LinEqSolver_prm & p ) [protected]
 

See documentation of one of the overloaded constructor.

LinEqSolver::~LinEqSolver ( ) [virtual]
 


Member Function Documentation

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

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

Reimplemented in DirectSolver, IterativeSolver, and KrylovItSolver.

String LinEqSolver::description ( ) const [virtual]
 

Reimplemented in AMG, Jacobi, SOR, SSOR, BiCGStab, CGS, ConjGrad, GaussElim, GMRES, MinRes, Orthomin, SymMinRes, Symmlq, TFQMR, and MLIter.

real LinEqSolver::getCPUtime ( ) const
 

returns the amount of CPU time spent for the last solve.

String LinEqSolver::getCategory ( ) const [pure virtual]
 

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

Reimplemented in DirectSolver, IterativeSolver, BasicItSolver, and KrylovItSolver.

real LinEqSolver::getStorage ( const LinEqSysStorage storage_tp = TOTAL_STORAGE ) const [pure virtual]
 

returns the storage estimate for the last solve. The argument "storage_tp" can be used to extract more detailed information.

Reimplemented in AMG, GaussElim, and IterativeSolver.

int LinEqSolver::getWork ( const LinEqSysWork work_tp = TOTAL_WORK ) const [pure virtual]
 

returns the work estimate for the last solve. The argument "work_tp" can be used to extract more detailed information.

Reimplemented in AMG, GaussElim, and IterativeSolver.

bool LinEqSolver::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 in DirectSolver, IterativeSolver, BasicItSolver, and KrylovItSolver.

void LinEqSolver::name2prm ( LinEqSolver_prm & prm,
const String & name ) [virtual]
 

given a string like the ones delivered by "prm2name", the current solver is reinitialized.

Reimplemented in GMRES, Orthomin, and Symmlq.

bool LinEqSolver::ok ( ) const [pure 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 in AMG, BiCGStab, CGS, ConjGrad, GaussElim, GMRES, IterativeSolver, BasicItSolver, KrylovItSolver, MinRes, Orthomin, SymMinRes, Symmlq, TFQMR, and MLIter.

void LinEqSolver::performance ( LinEqStatBlk & performance_status ) [virtual]
 

fills in the "LinEqStatBlk" object with relevant statistics regarding the last solve.

Reimplemented in SOR, SSOR, DirectSolver, IterativeSolver, Symmlq, and MLIter.

String LinEqSolver::prm2name ( ) const [virtual]
 

returns a string describing the current solver, based on the parameter values in use. For instance, the string "T-OM(5)" indicates that class "Orthomin" is in use with "nsearchv = 5" and "restart = false". For most solvers, this function simply returns the class name, e.g. the string "ConjGrad".

Reimplemented in GMRES, Orthomin, and Symmlq.

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

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

bool LinEqSolver::solve ( LinEqSystem & system ) [pure 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 in AMG, Jacobi, SOR, SSOR, BiCGStab, CGS, ConjGrad, GaussElim, GMRES, BasicItSolver, KrylovItSolver, MinRes, Orthomin, SymMinRes, Symmlq, TFQMR, and MLIter.

void LinEqSolver::startTime ( ) [protected]
 

void LinEqSolver::stopTime ( ) [protected]
 


Member Data Documentation

real LinEqSolver::alg_storage [protected]
 

int LinEqSolver::alg_work [protected]
 

bool LinEqSolver::building_framework [protected]
 

CPUclock LinEqSolver::cl [protected]
 

Handle(LinEqSystem) LinEqSolver::msys [protected]
 

Handle(LinEqSolver_prm) LinEqSolver::slvprm [protected]
 

real LinEqSolver::start_time [protected]
 

real LinEqSolver::stop_time [protected]
 


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