general class for direct solver More...
#include <DistributedSolver.hxx>
Public Member Functions | |
SparseDistributedSolver () | |
Default constructor. | |
void | SetPrintLevel (int print) |
Changes the level of displayed messages. | |
void | Clear () |
Clears LU matrices. | |
template<class Prop0 , class Storage0 , class Allocator0 > | |
void | Factorize (Matrix< T, Prop0, Storage0, Allocator0 > &A, bool keep_matrix=false, bool scale_matrix=false) |
template<class Prop0 , class Storage0 , class Allocator0 > | |
void | PerformAnalysis (Matrix< T, Prop0, Storage0, Allocator0 > &A) |
template<class Prop0 , class Storage0 , class Allocator0 > | |
void | PerformFactorization (Matrix< T, Prop0, Storage0, Allocator0 > &A, bool scale_matrix=false) |
template<class T1 > | |
void | Solve (Vector< T1 > &x_solution, const Vector< T1 > &b_rhs) |
solution of linear system Ax = b by using LU factorization (with scaling) More... | |
template<class T1 > | |
void | Solve (Vector< T1 > &x_solution) |
solution of linear system Ax = b by using LU factorization (with scaling) More... | |
template<class T1 > | |
void | TransSolve (Vector< T1 > &x_solution) |
solution of linear system A^T x = b by using LU factorization (with scaling) More... | |
template<class T1 > | |
void | Solve (const SeldonTranspose &, Vector< T1 > &x_solution, bool assemble=true) |
template<class T1 > | |
void | Solve (Matrix< T1, General, ColMajor > &x_solution) |
solution of linear system Ax = b by using LU factorization (with scaling) More... | |
template<class T1 > | |
void | TransSolve (Matrix< T1, General, ColMajor > &x_solution) |
solution of linear system A^T x = b by using LU factorization (with scaling) More... | |
template<class T1 > | |
void | Solve (const SeldonTranspose &, Matrix< T1, General, ColMajor > &x_solution) |
template<class MatrixSparse , class MatrixFull > | |
void | GetSchurComplement (MatrixSparse &mat_direct, const IVect &num, MatrixFull &mat_schur) |
Computation of a Schur Complement. More... | |
size_t | GetMemorySize () const |
returns in bytes the memory used by the direct solver | |
template<class Prop , class Storage , class Allocator > | |
void | Factorize (Matrix< T, Prop, Storage, Allocator > &A, bool keep_matrix, bool scale_matrix) |
factorization of matrix in sequential | |
template<class Prop , class Storage , class Allocator > | |
void | PerformAnalysis (Matrix< T, Prop, Storage, Allocator > &A) |
Performs the analysis of the matrix A before numerical factorization. | |
template<class Prop , class Storage , class Allocator > | |
void | PerformFactorization (Matrix< T, Prop, Storage, Allocator > &A, bool scale_matrix) |
Performs the numerical factorization. | |
int | GetM () const |
returns the number of rows of the factorised matrix | |
int | GetN () const |
returns the number of rows of the factorised 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 | HideMessages () |
hiding all messages | |
void | ShowMessages () |
displaying basic messages | |
void | ShowFullHistory () |
displaying all the messages | |
void | SetPivotThreshold (const double &) |
sets the threshold used for pivoting | |
void | SetNumberOfThreadPerNode (int m) |
modifies the number of threads per node (for Pastix only) | |
int | GetNumberOfThreadPerNode () const |
modifies the number of threads per node (for Pastix only) | |
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 | |
void | RefineSolution () |
void | DoNotRefineSolution () |
void | SetCoefficientEstimationNeededMemory (double) |
void | SetMaximumCoefficientEstimationNeededMemory (double) |
void | SetIncreaseCoefficientEstimationNeededMemory (double) |
double | GetThresholdMatrix () const |
returns threshold used for ilut (if this solver is selected) | |
void | SetThresholdMatrix (const double &) |
modifies threshold used for ilut | |
template<class Prop , class Storage , class Allocator > | |
void | Factorize (Matrix< T, Prop, Storage, Allocator > &A, bool keep_matrix=false) |
factorisation of matrix A More... | |
template<class Prop , class Storage , class Allocator > | |
void | PerformFactorization (Matrix< T, Prop, Storage, Allocator > &A) |
Performs the numerical factorization. | |
int | GetInfoFactorization (int &ierr) const |
Returns error code of the direct solver. | |
void | Solve (Vector< T > &x) |
x_solution is overwritten by solution of A x = b More... | |
void | Solve (const SeldonTranspose &TransA, Vector< T > &x, bool assemble=true) |
x_solution is overwritten with solution of A x = b or A^T x = b | |
void | Solve (Matrix< T, General, ColMajor > &x) |
x_solution is overwritten by solution of A x = b More... | |
void | Solve (const SeldonTranspose &, Matrix< T, General, ColMajor > &x) |
x_solution is overwritten by solution of A x = b More... | |
Static Public Member Functions | |
static bool | IsAvailableSolver (int type) |
returns true if the solver type is available | |
Protected Types | |
typedef ClassComplexType< T >::Treal | Treal |
Protected Member Functions | |
template<class MatrixSparse > | |
void | ScaleMatrixRowCol (MatrixSparse &A) |
scales matrix with 1 / \sum a_{i, j} (rows and columns) | |
bool | AffectOrdering () |
template<class T0 , class Prop , class Storage , class Alloc > | |
void | ComputeOrdering (Matrix< T0, Prop, Storage, Alloc > &A) |
computation of the permutation vector in order to reduce fill-in | |
void | InitSolver () |
initializes the solver (internal method) | |
Protected Attributes | |
bool | diagonal_scaling_left |
left scaling ? | |
bool | diagonal_scaling_right |
right scaling ? | |
Vector< Treal > | diagonal_scale_left |
left scaling | |
Vector< Treal > | diagonal_scale_right |
right scaling | |
int | type_ordering |
ordering to use | |
int | type_solver |
solver to use | |
int | nb_threads_per_node |
number of threads (for Pastix) | |
IVect | permut |
ordering (if supplied by the user) | |
int | n |
size of factorized linear system | |
VirtualSparseDirectSolver< T > * | solver |
pointer to the used solver | |
double | threshold_matrix |
threshold for ilut solver | |
double | pivot_threshold |
bool | refine_solution |
int | print_level |
bool | enforce_unsym_ilut |
use of non-symmetric ilut ? | |
general class for direct solver
This class will call one of the direct solver interfaced in Seldon (in sequential for Matrix and in distributed for DistributedMatrix). The user can also provide left/right scaling to apply to the matrix before factorization.
Definition at line 15 of file DistributedSolver.hxx.
|
inherited |
factorisation of matrix A
LU factorisation is stored in the current object. You can ask to clear the matrix given on input (to spare memory)
Definition at line 503 of file SparseDirectSolver.cxx.
void Seldon::SparseDistributedSolver< T >::GetSchurComplement | ( | MatrixSparse & | mat_direct, |
const IVect & | num, | ||
MatrixFull & | mat_schur | ||
) |
Computation of a Schur Complement.
[in] | mat_direct | initial matrix |
[in] | num | row numbers of the Schur Complement |
[out] | mat_schur | Schur Complement |
Definition at line 640 of file DistributedSolver.cxx.
|
inherited |
x_solution is overwritten by solution of A x = b
Multiple right hand sides We assume that Factorize has been called previously
Definition at line 827 of file SparseDirectSolver.cxx.
|
inherited |
x_solution is overwritten by solution of A x = b
Multiple right hand sides We assume that Factorize has been called previously
Definition at line 814 of file SparseDirectSolver.cxx.
void Seldon::SparseDistributedSolver< T >::Solve | ( | Matrix< T1, General, ColMajor > & | x_solution | ) |
solution of linear system Ax = b by using LU factorization (with scaling)
[in,out] | x_solution | on input right hand side, on output solution |
Definition at line 565 of file DistributedSolver.cxx.
|
inherited |
x_solution is overwritten by solution of A x = b
We assume that Factorize has been called previously
Definition at line 783 of file SparseDirectSolver.cxx.
void Seldon::SparseDistributedSolver< T >::Solve | ( | Vector< T1 > & | x_solution | ) |
solution of linear system Ax = b by using LU factorization (with scaling)
[in,out] | x_solution | on input right hand side, on output solution |
Definition at line 490 of file DistributedSolver.cxx.
void Seldon::SparseDistributedSolver< T >::Solve | ( | Vector< T1 > & | x_solution, |
const Vector< T1 > & | b_rhs | ||
) |
solution of linear system Ax = b by using LU factorization (with scaling)
[out] | x_solution | solution |
[in] | b_rhs | right hand side |
Definition at line 476 of file DistributedSolver.cxx.
void Seldon::SparseDistributedSolver< T >::TransSolve | ( | Matrix< T1, General, ColMajor > & | x_solution | ) |
solution of linear system A^T x = b by using LU factorization (with scaling)
[in,out] | x_solution | on input right hand sides, on output solution |
Definition at line 576 of file DistributedSolver.cxx.
void Seldon::SparseDistributedSolver< T >::TransSolve | ( | Vector< T1 > & | x_solution | ) |
solution of linear system A^T x = b by using LU factorization (with scaling)
[in,out] | x_solution | on input right hand side, on output solution |
Definition at line 502 of file DistributedSolver.cxx.