To set a preconditioner. More...
Public Member Functions | |
Prec () | |
Default constructor. | |
Prec (int type) | |
Constructor that chooses preconditioner. More... | |
Prec (const SpMatrix< T_ > &A, int type=DIAG_PREC) | |
Constructor using matrix of the linear system to precondition. More... | |
Prec (const Matrix< T_ > *A, int type=DIAG_PREC) | |
Constructor using matrix of the linear system to precondition. More... | |
~Prec () | |
Destructor. | |
void | setType (int type) |
Define preconditioner type. More... | |
void | setMatrix (const Matrix< T_ > *A) |
Define pointer to matrix for preconditioning (if this one is abstract) More... | |
void | setMatrix (const SpMatrix< T_ > &A) |
Define the matrix for preconditioning. More... | |
void | solve (Vect< T_ > &x) const |
Solve a linear system with preconditioning matrix. More... | |
void | solve (const Vect< T_ > &b, Vect< T_ > &x) const |
Solve a linear system with preconditioning matrix. More... | |
void | TransSolve (Vect< T_ > &x) const |
Solve a linear system with transposed preconditioning matrix. More... | |
void | TransSolve (const Vect< T_ > &b, Vect< T_ > &x) const |
Solve a linear system with transposed preconditioning matrix. More... | |
T_ & | getPivot (size_t i) const |
Return i-th pivot of preconditioning matrix. | |
To set a preconditioner.
The preconditioner type is chosen in the constructor
<T_> | Data type (real_t, float, complex<real_t>, ...) |
Prec | ( | int | type | ) |
Constructor that chooses preconditioner.
[in] | type | Preconditioner type:
|
Constructor using matrix of the linear system to precondition.
[in] | A | Matrix to precondition |
[in] | type | Preconditioner type:
|
Constructor using matrix of the linear system to precondition.
[in] | A | Pointer to abstract Matrix class to precondition |
[in] | type | Preconditioner type:
|
void setMatrix | ( | const Matrix< T_ > * | A | ) |
Define pointer to matrix for preconditioning (if this one is abstract)
[in] | A | Matrix to precondition |
void setMatrix | ( | const SpMatrix< T_ > & | A | ) |
Define the matrix for preconditioning.
[in] | A | Matrix to precondition (instance of class SpMatrix) |
void setType | ( | int | type | ) |
Define preconditioner type.
[in] | type | Preconditioner type:
|
Solve a linear system with preconditioning matrix.
[in] | b | Right-hand side |
[out] | x | Solution vector |
void solve | ( | Vect< T_ > & | x | ) | const |
Solve a linear system with preconditioning matrix.
[in,out] | x | Right-hand side on input and solution on output. |
Solve a linear system with transposed preconditioning matrix.
[in] | b | Right-hand side vector |
[out] | x | Solution vector |
void TransSolve | ( | Vect< T_ > & | x | ) | const |
Solve a linear system with transposed preconditioning matrix.
[in,out] | x | Right-hand side in input and solution in output. |