DiagPrec Class Template Reference
[Solver]
#include <Precond.h>
Detailed Description
template<class T_, class M_>
class OFELI::DiagPrec< T_, M_ >
To set diagonal preconditioner. All matrix elements are divided by diagonal elements.
Template Argument :
- T_ : data type (double, float, ...)
- M_ : matrix class
Public Member Functions | |
| DiagPrec (const M_ &a) | |
| Constructor using matrix of the linear system to precondition. | |
| const T_ & | getDiag (size_t i) const |
| Return i-th diagonal entry of preconditioning matrix. | |
| T_ & | getPivot (size_t i) const |
| Return i-th pivot of preconditioning matrix. | |
| void | Solve (const Vect< T_ > &b, Vect< T_ > &x) const |
| Solve a linear system with preconditioning matrix. | |
| void | Solve (Vect< T_ > &x) const |
| Solve a linear system with preconditioning matrix. | |
| void | TransSolve (const Vect< T_ > &b, Vect< T_ > &x) const |
| Solve a linear system with transposed preconditioning matrix. | |
| void | TransSolve (Vect< T_ > &x) const |
| Solve a linear system with transposed preconditioning matrix. | |
| ~DiagPrec () | |
| Destructor. | |
Member Function Documentation
Solve a linear system with preconditioning matrix.
- Parameters:
-
[in] b Right-hand side [out] x Solution vector
| void Solve | ( | Vect< T_ > & | x | ) | const |
Solve a linear system with preconditioning matrix.
- Parameters:
-
x [in/out] Right-hand side in input and solution in output.
Referenced by DiagPrec::TransSolve().
Solve a linear system with transposed preconditioning matrix.
- Parameters:
-
[in] b Right-hand side. [out] x Solution vector.
References DiagPrec::Solve().
| 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.
References DiagPrec::Solve().