Diffpack Documentation


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

LinEqSystemStd Class Reference

standard system of linear equations (`$`Ax = b`$`). More...

#include <LinEqSystem.h>

Inheritance diagram for LinEqSystemStd::

LinEqSystem HandleId LinEqSystemPrec LinEqSystemBlockPrec List of all members.

Public Methods

 LinEqSystemStd (LinEqStorageMode storage_mode=EXTERNAL_STORAGE)
 LinEqSystemStd (LinEqMatrix &A, LinEqVector &x, LinEqVector &b)
 LinEqSystemStd (Matrix(NUMT) &A, Vector(NUMT) &x, Vector(NUMT) &b)
 ~LinEqSystemStd ()
virtual void init ()
virtual void exit ()
virtual bool ok () const
void attach (LinEqMatrix &A, LinEqVector &x, LinEqVector &b)
void attach (LinEqMatrix &A)
void attach (LinEqVector &x, LinEqVector &b)
void attach (LinEqVector &x)
void attach (Matrix(NUMT) &A, Vector(NUMT) &x, Vector(NUMT) &b)
void attach (Matrix(NUMT) &A)
void attach (Vector(NUMT) &x, Vector(NUMT) &b)
void attach (Vector(NUMT) &x)
bool redim (const LinEqMatrix_prm &A_prm, const LinEqVector_prm &xb_prm)
bool redim (const LinEqMatrix &A, const LinEqVector &xb)
virtual bool hasLeftPrec () const
virtual bool hasRightPrec () const
virtual void connect (Handle(LinEqCommBlk))&
virtual void receive ()
virtual int getWork (const LinEqSysWork work_tp=TOTAL_WORK) const
virtual real getStorage (const LinEqSysStorage storage_tp=TOTAL_STORAGE) const
virtual void performance (LinEqStatBlk &performance_status)
virtual void residual (LinEqVector &v, Residual_type residual_tp=ORIGINAL_RES)
virtual void residuals (LinEqVector &r, LinEqVector &s)
virtual void residuals (LinEqVector &r, LinEqVector &s, LinEqVector &z)
virtual void matvec (const LinEqVector &c, LinEqVector &d, TransposeMode tpmode=NOT_TRANSPOSED, bool add_to_yb=false)
virtual void matvecLeftPrec (const LinEqVector &c, LinEqVector &d, TransposeMode tpmode=NOT_TRANSPOSED)
virtual void matvecRightPrec (const LinEqVector &c, LinEqVector &d, TransposeMode tpmode=NOT_TRANSPOSED)
virtual void matvecPrec (const LinEqVector &c, LinEqVector &d, TransposeMode tpmode=NOT_TRANSPOSED)
virtual void applyLeftPrec (const LinEqVector &c, LinEqVector &d, TransposeMode tpmode=NOT_TRANSPOSED)
virtual void applyRightPrec (const LinEqVector &c, LinEqVector &d, TransposeMode tpmode=NOT_TRANSPOSED)
virtual void applyPrec (const LinEqVector &c, LinEqVector &d, TransposeMode tpmode=NOT_TRANSPOSED)
virtual LinEqMatrixA ()
virtual const LinEqMatrixA () const
virtual LinEqVectorx ()
virtual const LinEqVectorx () const
virtual LinEqVectorb ()
virtual const LinEqVectorb () const
virtual bool factorize (const FactStrategy &fstrategy)
virtual void forwBack ()
virtual void debugPrint (Os os, int amount_of_output=1) const

Protected Attributes

Handle(LinEqMatrixAmat
Handle(LinEqVectorsol
Handle(LinEqVectorrhs
int matvecCalls
int factorizeCalls
int forwbackCalls
LinEqVector r

Detailed Description

standard system of linear equations (`$`Ax = b`$`).

NAME: LinEqSystemStd - standard system of linear equations (`$`Ax = b`$`)

DESCRIPTION:

The class defines the interface to standard liner system consisting of a coefficient matrix "A" and the two vectors "x" and "b" representing the solution and the right-hand side, respectively.


Constructor & Destructor Documentation

LinEqSystemStd::LinEqSystemStd ( LinEqStorageMode storage_mode = EXTERNAL_STORAGE )
 

Standard systems can be created in three different ways. The first constructor accepts a "LinEqStorageMode" parameter that states whether the matrix and vector entities are managed inetrnally or supplied by the user. In case of "EXTERNAL_STORAGE", all items are supplied by the user calling the appropriate "attach" functions. When using "EXTERNAL_SOLUTION", only the solution vector is supplied by the user. Finally, in case of "INTERNAL_STORAGE" all entities are internally allocated. The use of constructors accepting "Matrix(NUMT)" and "Vector(NUMT)" or "LinEqMatrix" and "LinEqVector" arguments imply the "EXTERNAL_STORAGE" mode.

LinEqSystemStd::LinEqSystemStd ( LinEqMatrix & A,
LinEqVector & x,
LinEqVector & b )
 

See documentation of one of the overloaded constructor.

LinEqSystemStd::LinEqSystemStd ( Matrix(NUMT) & A,
Vector(NUMT) & x,
Vector(NUMT) & b )
 

See documentation of one of the overloaded constructor.

LinEqSystemStd::~LinEqSystemStd ( )
 


Member Function Documentation

const LinEqMatrix & LinEqSystemStd::A ( ) const [inline, virtual]
 

See documentation of one of the overloaded functions.

Reimplemented from LinEqSystem.

LinEqMatrix & LinEqSystemStd::A ( ) [inline, virtual]
 

returns the coefficient matrix "A".

Reimplemented from LinEqSystem.

void LinEqSystemStd::applyLeftPrec ( const LinEqVector & c,
LinEqVector & d,
TransposeMode tpmode = NOT_TRANSPOSED ) [virtual]
 

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

void LinEqSystemStd::applyPrec ( const LinEqVector & c,
LinEqVector & d,
TransposeMode tpmode = NOT_TRANSPOSED ) [virtual]
 

applies the combined preconditioner "Cright*Cleft" to "c". Other versions ("applyLeftPrec" and "applyRightPrec") apply only one of the preconditioners. For a "LinEqSystemStd" object these functions have no action other than setting "d=c".

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec.

void LinEqSystemStd::applyRightPrec ( const LinEqVector & c,
LinEqVector & d,
TransposeMode tpmode = NOT_TRANSPOSED ) [virtual]
 

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

void LinEqSystemStd::attach ( Vector(NUMT) & x )
 

See documentation of one of the overloaded functions.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

void LinEqSystemStd::attach ( Vector(NUMT) & x,
Vector(NUMT) & b )
 

See documentation of one of the overloaded functions.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

void LinEqSystemStd::attach ( Matrix(NUMT) & A )
 

See documentation of one of the overloaded functions.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

void LinEqSystemStd::attach ( Matrix(NUMT) & A,
Vector(NUMT) & x,
Vector(NUMT) & b )
 

See documentation of one of the overloaded functions.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

void LinEqSystemStd::attach ( LinEqVector & x )
 

See documentation of one of the overloaded functions.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

void LinEqSystemStd::attach ( LinEqVector & x,
LinEqVector & b )
 

See documentation of one of the overloaded functions.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

void LinEqSystemStd::attach ( LinEqMatrix & A )
 

See documentation of one of the overloaded functions.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

void LinEqSystemStd::attach ( LinEqMatrix & A,
LinEqVector & x,
LinEqVector & b )
 

insert new matrix and/or vectors.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

const LinEqVector & LinEqSystemStd::b ( ) const [inline, virtual]
 

See documentation of one of the overloaded functions.

Reimplemented from LinEqSystem.

LinEqVector & LinEqSystemStd::b ( ) [inline, virtual]
 

returns the right-hand side "b".

Reimplemented from LinEqSystem.

void LinEqSystemStd::connect ( Handle(LinEqCommBlk) ) [inline, virtual]
 

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

prints various information useful for debugging. If the flag "printMatVec" is "true", the contents of "A", "x" and "b" are printed.

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

void LinEqSystemStd::exit ( ) [inline, virtual]
 

cleans up after use.

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec.

bool LinEqSystemStd::factorize ( const FactStrategy & fstrategy ) [virtual]
 

factorizes the coefficient matrix. Return false if factorization failed. See "LinEqMatrix" for details.

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec.

void LinEqSystemStd::forwBack ( ) [virtual]
 

solves the system based on the previously factorized matrix (see "factorize").

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec.

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

returns the storage cost for this system. The parameter of type "LinEqSysStorage" can be used to specify whether the total storage cost or a subset is returned.

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

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

returns an estimate of accumulated work used internally by this system. The parameter of type "LinEqSysWork" can be used to specify whether the total work cost or a subset is returned.

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

bool LinEqSystemStd::hasLeftPrec ( ) const [inline, virtual]
 

return "true" if there is a left or right preconditioner (other than the identity) attached. These functions will also return "false" for a standard system without preconditioning.

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

bool LinEqSystemStd::hasRightPrec ( ) const [inline, virtual]
 

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

void LinEqSystemStd::init ( ) [virtual]
 

initializes the system before use.

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

void LinEqSystemStd::matvec ( const LinEqVector & c,
LinEqVector & d,
TransposeMode tpmode = NOT_TRANSPOSED,
bool add_to_yb = false ) [virtual]
 

computes the matrix by vector product "d=Ac". A number of specialized versions ("matvecLeftPrec", "matvecRightPrec" and "matvecPrec") are available that incorporates the left and/or right preconditioner(s). For a "LinEqSystemStd" object these functions behave like the plain "matvec".

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec.

void LinEqSystemStd::matvecLeftPrec ( const LinEqVector & c,
LinEqVector & d,
TransposeMode tpmode = NOT_TRANSPOSED ) [virtual]
 

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec.

void LinEqSystemStd::matvecPrec ( const LinEqVector & c,
LinEqVector & d,
TransposeMode tpmode = NOT_TRANSPOSED ) [virtual]
 

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec.

void LinEqSystemStd::matvecRightPrec ( const LinEqVector & c,
LinEqVector & d,
TransposeMode tpmode = NOT_TRANSPOSED ) [virtual]
 

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec.

bool LinEqSystemStd::ok ( ) const [virtual]
 

checks that all entities are allocated and correcly set up.

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

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

record performance data in the supplied "LinEqStatBlk" object. This information can then be presented by calling the member functions of the "LinEqStatBlk" object.

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec, and LinEqSystemBlockPrec.

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

tells the system to fetch new data loaded in the connected "LinEqCommBlk". This function is seldom used directly by application programs.

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec.

bool LinEqSystemStd::redim ( const LinEqMatrix & A,
const LinEqVector & xb )
 

See documentation of one of the overloaded functions.

bool LinEqSystemStd::redim ( const LinEqMatrix_prm & A_prm,
const LinEqVector_prm & xb_prm )
 

redimension the system based on a given "LinEqMatrix" and "LinEqVector" objects, or based on correponding parameter classes.

void LinEqSystemStd::residual ( LinEqVector & v,
Residual_type residual_tp = ORIGINAL_RES ) [virtual]
 

computes the residual based on the current value of the solution vector "x". The "Residual_type" parameter determines whether the original or the preconditioned residual is computed.

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec.

void LinEqSystemStd::residuals ( LinEqVector & r,
LinEqVector & s,
LinEqVector & z ) [virtual]
 

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec.

void LinEqSystemStd::residuals ( LinEqVector & r,
LinEqVector & s ) [virtual]
 

Reimplemented from LinEqSystem.

Reimplemented in LinEqSystemPrec.

const LinEqVector & LinEqSystemStd::x ( ) const [inline, virtual]
 

See documentation of one of the overloaded functions.

Reimplemented from LinEqSystem.

LinEqVector & LinEqSystemStd::x ( ) [inline, virtual]
 

returns the solution vector "x".

Reimplemented from LinEqSystem.


Member Data Documentation

Handle(LinEqMatrix) LinEqSystemStd::Amat [protected]
 

int LinEqSystemStd::factorizeCalls [protected]
 

int LinEqSystemStd::forwbackCalls [protected]
 

int LinEqSystemStd::matvecCalls [protected]
 

LinEqVector LinEqSystemStd::r [protected]
 

Handle(LinEqVector) LinEqSystemStd::rhs [protected]
 

Handle(LinEqVector) LinEqSystemStd::sol [protected]
 


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