#include <ConjGrad.h>
Inheritance diagram for ConjGrad::

Public Methods | |
| ConjGrad () | |
| ConjGrad (const LinEqSolver_prm &pm) | |
| ~ConjGrad () | |
| virtual bool | ok () const |
| virtual bool | solve (LinEqSystem &system) |
| virtual String | description () const |
Protected Methods | |
| virtual bool | redim (LinEqSystem &system) |
| virtual void | initCommBlk () |
| virtual void | updateCommBlk () |
Protected Attributes | |
| NUMT | alpha |
| NUMT | beta |
| NUMT | rho |
| NUMT | rho1 |
| LinEqVector | u |
| LinEqVector | p |
NAME: ConjGrad - iterative method for matrix systems
DESCRIPTION:
The class implements the conjugate gradient (CG) method for solving systems of linear equations. The system is represented as a class "LinEqSystem" object. Usually, an object of type "ConjGrad" is created on basis of the parameter object "LinEqSolver_prm" using the function "LinEqSolver_prm create".
To guarantee convergence of this method, the coefficient matrix should be symmetric and positive definite (SPD). Please notice that any preconditoner should also be SPD. In case of symmetric indefinite problems, a modified version is implemented in class "Symmlq".
|
|
Since no parameters are needed for this methods, the default constructor takes no arguments. For the sake of compatibility, there is also a constructor accepting a "LinEqSolver_prm" object. Internal "LinEqVector" attributes are not properly initialized by the constructor. These are initialized by the "redim" function which is called from "solve". Thus, the user of this class need not be careful with initialization of objects: The constructor and the "solve" function will take care of it. |
|
|
See documentation of one of the overloaded constructor. |
|
|
|
|
|
Reimplemented from LinEqSolver. |
|
|
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 KrylovItSolver. |
|
|
returns "true" if the object is in an ok state, that is, if all internal attricutes seems to be initialized. This "ok" function is called in "solve" and the user of the class should never need to call "ok". Reimplemented from KrylovItSolver. |
|
|
redimensions the internal data structure (usually "LinEqVector" objects) on basis of the size of a "LinEqSystem" given as argument to "redim". The "redim" function is usually called from "solve" and a user of the class will seldom need to call "redim" explicitly. Reimplemented from KrylovItSolver. |
|
|
solve a system of linear equations. Reimplemented from KrylovItSolver. |
|
|
forces a update of the attached communication block, should be called at the end of each iteration. (For internal use only). Reimplemented from IterativeSolver. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|