Equa< T_ > Class Template Reference
Mother abstract class to describe equation. More...
Inheritance diagram for Equa< T_ >:
Public Member Functions | |
| Equa () | |
| Default constructor. | |
| virtual | ~Equa () |
| Destructor. | |
| void | setMesh (Mesh &m) |
| Define mesh and renumber DOFs after removing imposed ones. | |
| Mesh & | getMesh () const |
| Return reference to Mesh instance. More... | |
| LinearSolver< T_ > & | getLinearSolver () |
| Return reference to linear solver instance. | |
| Matrix< T_ > * | getMatrix () const |
| Return pointer to matrix. | |
| void | setSolver (Iteration ls, Preconditioner pc=IDENT_PREC) |
| Choose solver for the linear system. More... | |
| void | setLinearSolver (Iteration ls, Preconditioner pc=IDENT_PREC) |
| Choose solver for the linear system. More... | |
| void | setMatrixType (int t) |
| Choose type of matrix. More... | |
| int | solveLinearSystem (Matrix< T_ > *A, Vect< T_ > &b, Vect< T_ > &x) |
| Solve the linear system with given matrix and right-hand side. More... | |
| int | solveLinearSystem (Vect< T_ > &b, Vect< T_ > &x) |
| Solve the linear system with given right-hand side. More... | |
Detailed Description
template<class T_>
class OFELI::Equa< T_ >
Mother abstract class to describe equation.
- Template Parameters
-
<T_> Data type (real_t, float, complex<real_t>, ...)
- Author
- Rachid Touzani
- Copyright
- GNU Lesser Public License
Member Function Documentation
| void setSolver | ( | Iteration | ls, |
| Preconditioner | pc = IDENT_PREC |
||
| ) |
Choose solver for the linear system.
- Parameters
-
[in] ls Solver of the linear system. To choose among the enumerated values: DIRECT_SOLVER,CG_SOLVER,GMRES_SOLVER-
DIRECT_SOLVER, Use a facorization solver [default] -
CG_SOLVER, Conjugate Gradient iterative solver -
CGS_SOLVER, Squared Conjugate Gradient iterative solver -
BICG_SOLVER, BiConjugate Gradient iterative solver -
BICG_STAB_SOLVER, BiConjugate Gradient Stabilized iterative solver -
GMRES_SOLVER, GMRES iterative solver -
QMR_SOLVER, QMR iterative solver
[in] pc Preconditioner to associate to the iterative solver. If the direct solver was chosen for the first argument this argument is not used. Otherwise choose among the enumerated values: -
IDENT_PREC, Identity preconditioner (no preconditioning [default]) -
DIAG_PREC, Diagonal preconditioner -
ILU_PREC, Incomplete LU factorization preconditioner
-
| void setLinearSolver | ( | Iteration | ls, |
| Preconditioner | pc = IDENT_PREC |
||
| ) |
Choose solver for the linear system.
- Parameters
-
[in] ls Solver of the linear system. To choose among the enumerated values: DIRECT_SOLVER,CG_SOLVER,GMRES_SOLVER-
DIRECT_SOLVER, Use a facorization solver [default] -
CG_SOLVER, Conjugate Gradient iterative solver -
CGS_SOLVER, Squared Conjugate Gradient iterative solver -
BICG_SOLVER, BiConjugate Gradient iterative solver -
BICG_STAB_SOLVER, BiConjugate Gradient Stabilized iterative solver -
GMRES_SOLVER, GMRES iterative solver -
QMR_SOLVER, QMR iterative solver
[in] pc Preconditioner to associate to the iterative solver. If the direct solver was chosen for the first argument this argument is not used. Otherwise choose among the enumerated values: -
IDENT_PREC, Identity preconditioner (no preconditioning [default]) -
DIAG_PREC, Diagonal preconditioner -
ILU_PREC, Incomplete LU factorization preconditioner
-
| void setMatrixType | ( | int | t | ) |
Choose type of matrix.
- Parameters
-
[in] t Type of the used matrix. To choose among the enumerated values: SKYLINE,SPARSE,DIAGONALTRIDIAGONAL,SYMMETRIC,UNSYMMETRIC,IDENTITY
Solve the linear system with given matrix and right-hand side.
- Parameters
-
[in] A Pointer to matrix of the system [in] b Vector containing right-hand side [in,out] x Vector containing initial guess of solution on input, actual solution on output