|
rheolef
6.3
|
solver - direct or interative solver interface
More...
#include <solver.h>


Public Types | |
| typedef solver_rep< T, M > | rep |
| typedef smart_pointer< rep > | base |
solver - direct or interative solver interface
The class implements a matrix factorization: LU factorization for an unsymmetric matrix and Choleski fatorisation for a symmetric one.
Let a be a square invertible matrix in csr format (see csr).
We get the factorization by:
Each call to the direct solver for a*x = b writes either:
When the matrix is modified in a computation loop but conserves its sparsity pattern, an efficient re-factorization writes:
This approach skip the long step of the symbolic factization step.
ITERATIVE SOLVER
The factorization can also be incomplete, i.e. a pseudo-inverse, suitable for preconditionning iterative methods. In that case, the sa.solve(b) call runs a conjugate gradient when the matrix is symmetric, or a generalized minimum residual algorithm when the matrix is unsymmetric.
AUTOMATIC CHOICE AND CUSTOMIZATION
The symmetry of the matrix is tested via the a.is_symmetric() property (see csr) while the choice between direct or iterative solver is switched from the a.pattern_dimension() value. When the pattern is 3D, an iterative method is faster and less memory consuming. Otherwhise, for 1D or 2D problems, the direct method is prefered.
These default choices can be supersetted by using explicit options:
See the solver.h header for the complete list of available options.
IMPLEMENTATION NOTE
The implementation bases on the pastix library.
| typedef solver_rep<T,M> rheolef::solver_basic< T, M >::rep |
| typedef smart_pointer<rep> rheolef::solver_basic< T, M >::base |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |