Class grouping different direct solvers. More...
#include <SparseSolver.hxx>
Public Types | |
enum | { SELDON_SOLVER, UMFPACK, SUPERLU, MUMPS, PASTIX, ILUT } |
enum | { FACTO_OK, STRUCTURALLY_SINGULAR_MATRIX, NUMERICALLY_SINGULAR_MATRIX, OUT_OF_MEMORY, INVALID_ARGUMENT, INCORRECT_NUMBER_OF_ROWS, MATRIX_INDICES_INCORRECT, INVALID_PERMUTATION, ORDERING_FAILED, INTERNAL_ERROR } |
Public Member Functions | |
SparseDirectSolver () | |
Default constructor. | |
void | HideMessages () |
Hiding all messages. | |
void | ShowMessages () |
Displaying basic messages. | |
void | ShowFullHistory () |
Displaying all the messages. | |
void | Clear () |
Clearing factorization. | |
int | GetM () const |
Returns the number of rows of the factorized matrix. | |
int | GetN () const |
Returns the number of rows of the factorized matrix. | |
int | GetTypeOrdering () const |
Returns the ordering algorithm to use. | |
void | SetPermutation (const IVect &) |
Sets directly the new ordering (by giving a permutation vector). | |
void | SelectOrdering (int) |
Modifies the ordering algorithm to use. | |
void | SetNumberThreadPerNode (int m) |
Modifies the number of threads per node (for Pastix only). | |
template<class MatrixSparse > | |
void | ComputeOrdering (MatrixSparse &A) |
Computation of the permutation vector in order to reduce fill-in. | |
void | SelectDirectSolver (int) |
Modifies the direct solver to use. | |
void | SetNonSymmetricIlut () |
Enforces the use of unsymmetric algorithm for ilut solver. | |
int | GetDirectSolver () |
Returns the direct solver to use. | |
double | GetThresholdMatrix () const |
Returns threshold used for ilut (if this solver is selected). | |
template<class MatrixSparse > | |
void | Factorize (MatrixSparse &A, bool keep_matrix=false) |
Factorization of matrix A. | |
int | GetInfoFactorization (int &ierr) const |
Returns error code of the direct solver (for Mumps only). | |
template<class Vector1 > | |
void | Solve (Vector1 &x) |
x_solution is overwritten by solution of A x = b. | |
template<class TransStatus , class Vector1 > | |
void | Solve (const TransStatus &TransA, Vector1 &x) |
x_solution is overwritten with solution of A x = b or A^T x = b. | |
Protected Attributes | |
int | type_ordering |
Ordering to use. | |
int | type_solver |
Solver to use. | |
int | number_threads_per_node |
Number of threads (for Pastix). | |
IVect | permut |
Ordering (if supplied by the user). | |
int | n |
Size of factorized linear system. | |
double | threshold_matrix |
Threshold for ilut solver. | |
bool | enforce_unsym_ilut |
Use of non-symmetric ilut? | |
SparseSeldonSolver< T > | mat_seldon |
Default solver. |
Class grouping different direct solvers.
Definition at line 84 of file SparseSolver.hxx.
void Seldon::SparseDirectSolver< T >::Factorize | ( | MatrixSparse & | A, | |
bool | keep_matrix = false | |||
) |
Factorization of matrix A.
LU factorization is stored in the current object. You can ask to clear the matrix given on input (to spare memory).
Definition at line 1358 of file SparseSolver.cxx.
void Seldon::SparseDirectSolver< T >::Solve | ( | Vector1 & | x_solution | ) |
x_solution is overwritten by solution of A x = b.
We assume that Factorize has been called previously.
Definition at line 1523 of file SparseSolver.cxx.