Prec< T_ > Class Template Reference
To set a preconditioner. More...
Public Member Functions | |
| Prec () | |
| Default constructor. | |
| Prec (int type) | |
| Constructor that chooses preconditioner. | |
| Prec (const SpMatrix< T_ > &A, int type=IDENT_PREC) | |
| Constructor using matrix of the linear system to precondition. | |
| Prec (const Matrix< T_ > *A, int type=IDENT_PREC) | |
| Constructor using matrix of the linear system to precondition. | |
| ~Prec () | |
| Destructor. | |
| void | setType (int type) |
| Define preconditioner type. | |
| void | setMatrix (const Matrix< T_ > *A) |
| Define pointer to matrix for preconditioning (if this one is abstract) | |
| void | setMatrix (const SpMatrix< T_ > &A) |
| Define the matrix for preconditioning. | |
| void | Solve (Vect< T_ > &x) const |
| Solve a linear system with preconditioning matrix. | |
| void | Solve (const Vect< T_ > &b, Vect< T_ > &x) const |
| Solve a linear system with preconditioning matrix. | |
| void | TransSolve (Vect< T_ > &x) const |
| Solve a linear system with transposed preconditioning matrix. | |
| void | TransSolve (const Vect< T_ > &b, Vect< T_ > &x) const |
| Solve a linear system with transposed preconditioning matrix. | |
| T_ & | getPivot (size_t i) const |
| Return i-th pivot of preconditioning matrix. | |
Detailed Description
template<class T_>
class OFELI::Prec< T_ >
To set a preconditioner.
The preconditioner type is chosen in the constructor
- Template Parameters:
-
<T_> Data type (double, float, complex<double>, ...)
Constructor & Destructor Documentation
| Prec | ( | int | type | ) |
Constructor that chooses preconditioner.
- Parameters:
-
[in] type Preconditioner type: - IDENT_PREC : Identity preconditioner (No preconditioning)
- DIAG_PREC : Diagonal preconditioner
- ILU_PREC : Icomplete factorization preconditioner
Constructor using matrix of the linear system to precondition.
- Parameters:
-
[in] A Matrix to precondition [in] type Preconditioner type: - IDENT_PREC : Identity preconditioner (No preconditioning)
- DIAG_PREC : Diagonal preconditioner
- ILU_PREC : Icomplete factorization preconditioner
Constructor using matrix of the linear system to precondition.
- Parameters:
-
[in] A Pointer to abstract Matrix class to precondition [in] type Preconditioner type: - IDENT_PREC : Identity preconditioner (No preconditioning)
- DIAG_PREC : Diagonal preconditioner
- ILU_PREC : Icomplete factorization preconditioner
Member Function Documentation
| void setType | ( | int | type | ) |
Define preconditioner type.
- Parameters:
-
[in] type Preconditioner type: - IDENT_PREC : Identity preconditioner (No preconditioning)
- DIAG_PREC : Diagonal preconditioner
- ILU_PREC : Icomplete factorization preconditioner
Define pointer to matrix for preconditioning (if this one is abstract)
- Parameters:
-
[in] A Matrix to precondition
Define the matrix for preconditioning.
- Parameters:
-
[in] A Matrix to precondition (instance of class SpMatrix)
Solve a linear system with preconditioning matrix.
- Parameters:
-
[in,out] x Right-hand side in input and solution in output.
Solve a linear system with preconditioning matrix.
- Parameters:
-
[in] b Right-hand side [out] x Solution vector
| void TransSolve | ( | Vect< T_ > & | x | ) | const |
Solve a linear system with transposed preconditioning matrix.
- Parameters:
-
[in,out] x Right-hand side in input and solution in output.
| void TransSolve | ( | const Vect< T_ > & | b, |
| Vect< T_ > & | x | ||
| ) | const |
Solve a linear system with transposed preconditioning matrix.
- Parameters:
-
[in] b Right-hand side [out] x Solution vector
- OFELI
- Prec
Copyright © 1998-2012 Rachid Touzani