Sparse direct LU solver based on PaStiX library. More...
#include <PaStiXSupport.h>
Public Types | |
typedef internal::pastix_traits < PastixLU< _MatrixType > >::MatrixType | _MatrixType |
typedef PastixBase< PastixLU < MatrixType > > | Base |
typedef MatrixType::Index | Index |
typedef _MatrixType | MatrixType |
typedef SparseMatrix< Scalar, ColMajor > | PaStiXType |
typedef MatrixType::RealScalar | RealScalar |
typedef MatrixType::Scalar | Scalar |
typedef Matrix< Scalar, Dynamic, 1 > | Vector |
Public Member Functions | |
bool | _solve (const MatrixBase< Rhs > &b, MatrixBase< Dest > &x) const |
void | _solve_sparse (const Rhs &b, SparseMatrix< DestScalar, DestOptions, DestIndex > &dest) const |
PastixLU< _MatrixType > & | analyzePattern (MatrixType &mat) |
void | analyzePattern (const MatrixType &matrix) |
Index | cols () const |
void | compute (const MatrixType &matrix) |
PastixLU< _MatrixType > & | derived () |
const PastixLU< _MatrixType > & | derived () const |
Array< RealScalar, IPARM_SIZE, 1 > & | dparm () |
double & | dparm (int idxparam) |
PastixLU< _MatrixType > & | factorize (MatrixType &mat) |
void | factorize (const MatrixType &matrix) |
ComputationInfo | info () const |
Reports whether previous computation was successful. | |
Array< Index, IPARM_SIZE, 1 > & | iparm () |
int & | iparm (int idxparam) |
void | PastixInit () |
PastixLU () | |
PastixLU (const MatrixType &matrix) | |
Index | rows () const |
const internal::solve_retval < PastixBase, Rhs > | solve (const MatrixBase< Rhs > &b) const |
const internal::sparse_solve_retval < PastixBase, Rhs > | solve (const SparseMatrixBase< Rhs > &b) const |
Protected Member Functions | |
PastixLU< _MatrixType > & | compute (MatrixType &mat) |
void | PastixDestroy () |
Protected Attributes | |
int | m_amalgamation |
int | m_analysisIsOk |
int | m_comm |
Matrix< double, DPARM_SIZE, 1 > | m_dparm |
int | m_factorizationIsOk |
bool | m_hasTranspose |
ComputationInfo | m_info |
int | m_initisOk |
Matrix< Index, Dynamic, 1 > | m_invp |
Matrix< Index, IPARM_SIZE, 1 > | m_iparm |
bool | m_isInitialized |
SparseMatrix< Scalar, ColMajor > | m_mat_null |
int | m_ordering |
pastix_data_t * | m_pastixdata |
Matrix< Index, Dynamic, 1 > | m_perm |
int | m_size |
SparseMatrix< Scalar, ColMajor > | m_StrMatTrans |
Matrix< Scalar, Dynamic, 1 > | m_vec_null |
Sparse direct LU solver based on PaStiX library.
This class is used to solve the linear systems A.X = B with a supernodal LU factorization in the PaStiX library. The matrix A should be squared and nonsingular PaStiX requires that the matrix A has a symmetric structural pattern. This interface can symmetrize the input matrix otherwise. The vectors or matrices X and B can be either dense or sparse.
_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<> |
IsStrSym | Indicates if the input matrix has a symmetric pattern, default is false NOTE : Note that if the analysis and factorization phase are called separately, the input matrix will be symmetrized at each call, hence it is advised to symmetrize the matrix in a end-user program and set IsStrSym to true |
typedef internal::pastix_traits<PastixLU< _MatrixType > >::MatrixType _MatrixType [inherited] |
typedef PastixBase<PastixLU<MatrixType> > Base |
typedef MatrixType::Index Index [inherited] |
typedef _MatrixType MatrixType |
Reimplemented from PastixBase< PastixLU< _MatrixType > >.
typedef SparseMatrix<Scalar, ColMajor> PaStiXType |
typedef MatrixType::RealScalar RealScalar [inherited] |
typedef MatrixType::Scalar Scalar |
Reimplemented from PastixBase< PastixLU< _MatrixType > >.
PastixLU | ( | ) | [inline] |
PastixLU | ( | const MatrixType & | matrix | ) | [inline] |
References PastixLU< _MatrixType, IsStrSym >::compute().
bool _solve | ( | const MatrixBase< Rhs > & | b, |
MatrixBase< Dest > & | x | ||
) | const [inherited] |
void _solve_sparse | ( | const Rhs & | b, |
SparseMatrix< DestScalar, DestOptions, DestIndex > & | dest | ||
) | const [inline, inherited] |
PastixLU< _MatrixType > & analyzePattern | ( | MatrixType & | mat | ) | [inherited] |
void analyzePattern | ( | const MatrixType & | matrix | ) | [inline] |
Compute the LU symbolic factorization of matrix
using its sparsity pattern. Several ordering methods can be used at this step. See the PaStiX user's manual. The result of this operation can be used with successive matrices having the same pattern as matrix
References PastixBase< Derived >::analyzePattern(), PastixBase< PastixLU< _MatrixType > >::m_hasTranspose, PastixBase< PastixLU< _MatrixType > >::m_iparm, PastixBase< PastixLU< _MatrixType > >::m_StrMatTrans, and PastixBase< Derived >::PastixInit().
References PastixBase< Derived >::m_size.
PastixLU< _MatrixType > & compute | ( | MatrixType & | mat | ) | [protected, inherited] |
void compute | ( | const MatrixType & | matrix | ) | [inline] |
Compute the LU supernodal factorization of matrix
. iparm and dparm can be used to tune the PaStiX parameters. see the PaStiX user's manual
References PastixBase< Derived >::compute(), PastixBase< PastixLU< _MatrixType > >::m_hasTranspose, PastixBase< PastixLU< _MatrixType > >::m_iparm, PastixBase< PastixLU< _MatrixType > >::m_StrMatTrans, and PastixBase< Derived >::PastixInit().
Referenced by PastixLU< _MatrixType, IsStrSym >::PastixLU().
PastixLU< _MatrixType > & derived | ( | ) | [inline, inherited] |
const PastixLU< _MatrixType > & derived | ( | ) | const [inline, inherited] |
Array<RealScalar,IPARM_SIZE,1>& dparm | ( | ) | [inline, inherited] |
Returns a reference to the double vector DPARM of PaStiX parameters The statistics related to the different phases of factorization and solve are saved here as well
References PastixBase< Derived >::m_dparm.
Return a reference to a particular index parameter of the DPARM vector
References PastixBase< Derived >::m_dparm.
PastixLU< _MatrixType > & factorize | ( | MatrixType & | mat | ) | [inherited] |
void factorize | ( | const MatrixType & | matrix | ) | [inline] |
Compute the LU supernodal factorization of matrix
WARNING The matrix matrix
should have the same structural pattern as the same used in the analysis phase.
References PastixBase< Derived >::factorize(), PastixBase< PastixLU< _MatrixType > >::m_hasTranspose, PastixBase< PastixLU< _MatrixType > >::m_iparm, and PastixBase< PastixLU< _MatrixType > >::m_StrMatTrans.
ComputationInfo info | ( | ) | const [inline, inherited] |
Reports whether previous computation was successful.
Success
if computation was succesful, NumericalIssue
if the PaStiX reports a problem InvalidInput
if the input matrix is invalidReferences PastixBase< Derived >::m_info, and PastixBase< Derived >::m_isInitialized.
Returns a reference to the integer vector IPARM of PaStiX parameters to modify the default parameters. The statistics related to the different phases of factorization and solve are saved here as well
References PastixBase< Derived >::m_iparm.
Return a reference to a particular index parameter of the IPARM vector
References PastixBase< Derived >::m_iparm.
void PastixDestroy | ( | ) | [inline, protected, inherited] |
References PlainObjectBase< Derived >::data(), Eigen::internal::eigen_pastix(), SparseMatrix< _Scalar, _Options, _Index >::innerIndexPtr(), PastixBase< Derived >::m_dparm, PastixBase< Derived >::m_initisOk, PastixBase< Derived >::m_invp, PastixBase< Derived >::m_iparm, PastixBase< Derived >::m_mat_null, PastixBase< Derived >::m_pastixdata, PastixBase< Derived >::m_perm, PastixBase< Derived >::m_vec_null, SparseMatrix< _Scalar, _Options, _Index >::outerIndexPtr(), and SparseMatrix< _Scalar, _Options, _Index >::valuePtr().
void PastixInit | ( | ) | [inherited] |
Initialize the PaStiX data structure. A first call to this function fills iparm and dparm with the default PaStiX parameters
References PastixBase< Derived >::m_size.
const internal::solve_retval<PastixBase, Rhs> solve | ( | const MatrixBase< Rhs > & | b | ) | const [inline, inherited] |
References PastixBase< Derived >::m_isInitialized, and PastixBase< Derived >::rows().
const internal::sparse_solve_retval<PastixBase, Rhs> solve | ( | const SparseMatrixBase< Rhs > & | b | ) | const [inline, inherited] |
References EigenBase< Derived >::derived(), PastixBase< Derived >::m_isInitialized, SparseMatrixBase< Derived >::rows(), and PastixBase< Derived >::rows().
int m_amalgamation [mutable, protected, inherited] |
int m_analysisIsOk [protected, inherited] |
int m_factorizationIsOk [protected, inherited] |
bool m_hasTranspose [mutable, protected, inherited] |
ComputationInfo m_info [mutable, protected, inherited] |
int m_initisOk [protected, inherited] |
bool m_isInitialized [protected, inherited] |
SparseMatrix<Scalar, ColMajor> m_mat_null [mutable, protected, inherited] |
int m_ordering [mutable, protected, inherited] |
pastix_data_t* m_pastixdata [mutable, protected, inherited] |
SparseMatrix<Scalar, ColMajor> m_StrMatTrans [mutable, protected, inherited] |
Matrix<Scalar, Dynamic,1> m_vec_null [mutable, protected, inherited] |