Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
PastixLU< _MatrixType, IsStrSym > Class Template Reference

Sparse direct LU solver based on PaStiX library. More...

#include <PaStiXSupport.h>

+ Inheritance diagram for PastixLU< _MatrixType, IsStrSym >:

List of all members.

Public Types

typedef
internal::pastix_traits
< PastixLU< _MatrixType >
>::MatrixType 
_MatrixType
typedef PastixBase< PastixLU
< MatrixType > > 
Base
typedef Base::ColSpMatrix ColSpMatrix
typedef MatrixType::Index Index
typedef _MatrixType MatrixType
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
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)
void factorize (const MatrixType &matrix)
ComputationInfo info () const
 Reports whether previous computation was successful.
Array< Index, IPARM_SIZE, 1 > & iparm ()
intiparm (int idxparam)
 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

void analyzePattern (ColSpMatrix &mat)
void clean ()
void compute (ColSpMatrix &mat)
void factorize (ColSpMatrix &mat)
void grabMatrix (const MatrixType &matrix, ColSpMatrix &out)
void init ()

Protected Attributes

int m_analysisIsOk
int m_comm
Matrix< double, DPARM_SIZE, 1 > m_dparm
int m_factorizationIsOk
ComputationInfo m_info
int m_initisOk
Matrix< Index, Dynamic, 1 > m_invp
Matrix< int, IPARM_SIZE, 1 > m_iparm
bool m_isInitialized
pastix_data_t * m_pastixdata
Matrix< Index, Dynamic, 1 > m_perm
int m_size
bool m_structureIsUptodate
ColSpMatrix m_transposedStructure

Detailed Description

template<typename _MatrixType, bool IsStrSym>
class Eigen::PastixLU< _MatrixType, IsStrSym >

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.

Template Parameters:
_MatrixTypethe type of the sparse matrix A, it must be a SparseMatrix<>
IsStrSymIndicates 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
See also:
Solving linear problems

Member Typedef Documentation

typedef internal::pastix_traits<PastixLU< _MatrixType > >::MatrixType _MatrixType
inherited
typedef MatrixType::Index Index
typedef MatrixType::RealScalar RealScalar
inherited
typedef MatrixType::Scalar Scalar
inherited
typedef Matrix<Scalar,Dynamic,1> Vector
inherited

Constructor & Destructor Documentation

PastixLU ( )
inline
PastixLU ( const MatrixType matrix)
inline

Member Function Documentation

bool _solve ( const MatrixBase< Rhs > &  b,
MatrixBase< Dest > &  x 
) const
inherited
void _solve_sparse ( const Rhs &  b,
SparseMatrix< DestScalar, DestOptions, DestIndex > &  dest 
) const
inlineinherited
void analyzePattern ( ColSpMatrix mat)
protectedinherited
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

See also:
factorize()

References PastixBase< Derived >::analyzePattern(), PastixLU< _MatrixType, IsStrSym >::grabMatrix(), and PastixLU< _MatrixType, IsStrSym >::m_structureIsUptodate.

void clean ( )
inlineprotectedinherited
Index cols ( void  ) const
inlineinherited
void compute ( ColSpMatrix mat)
protectedinherited
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

See also:
analyzePattern() factorize()

References PastixBase< Derived >::compute(), PastixLU< _MatrixType, IsStrSym >::grabMatrix(), and PastixLU< _MatrixType, IsStrSym >::m_structureIsUptodate.

Referenced by PastixLU< _MatrixType, IsStrSym >::PastixLU().

PastixLU< _MatrixType > & derived ( )
inlineinherited
const PastixLU< _MatrixType > & derived ( ) const
inlineinherited
Array<RealScalar,IPARM_SIZE,1>& dparm ( )
inlineinherited

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

See also:
analyzePattern() factorize()

References PastixBase< Derived >::m_dparm.

double& dparm ( int  idxparam)
inlineinherited

Return a reference to a particular index parameter of the DPARM vector

See also:
dparm()

References PastixBase< Derived >::m_dparm.

void factorize ( ColSpMatrix mat)
protectedinherited
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.

See also:
analyzePattern()

References PastixBase< Derived >::factorize(), and PastixLU< _MatrixType, IsStrSym >::grabMatrix().

void grabMatrix ( const MatrixType matrix,
ColSpMatrix out 
)
inlineprotected
ComputationInfo info ( ) const
inlineinherited

Reports whether previous computation was successful.

Returns:
Success if computation was succesful, NumericalIssue if the PaStiX reports a problem InvalidInput if the input matrix is invalid
See also:
iparm()

References eigen_assert, PastixBase< Derived >::m_info, and PastixBase< Derived >::m_isInitialized.

void init ( )
inlineprotected
Array<Index,IPARM_SIZE,1>& iparm ( )
inlineinherited

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

See also:
analyzePattern() factorize()

References PastixBase< Derived >::m_iparm.

int& iparm ( int  idxparam)
inlineinherited

Return a reference to a particular index parameter of the IPARM vector

See also:
iparm()

References PastixBase< Derived >::m_iparm.

Index rows ( void  ) const
inlineinherited
const internal::solve_retval<PastixBase, Rhs> solve ( const MatrixBase< Rhs > &  b) const
inlineinherited
Returns:
the solution x of $ A x = b $ using the current decomposition of A.
See also:
compute()

References eigen_assert, PastixBase< Derived >::m_isInitialized, and PastixBase< Derived >::rows().

const internal::sparse_solve_retval<PastixBase, Rhs> solve ( const SparseMatrixBase< Rhs > &  b) const
inlineinherited
Returns:
the solution x of $ A x = b $ using the current decomposition of A.
See also:
compute()

References EigenBase< Derived >::derived(), eigen_assert, PastixBase< Derived >::m_isInitialized, SparseMatrixBase< Derived >::rows(), and PastixBase< Derived >::rows().


Member Data Documentation

int m_analysisIsOk
protectedinherited
int m_comm
mutableprotectedinherited
Matrix<double,DPARM_SIZE,1> m_dparm
mutableprotectedinherited
int m_factorizationIsOk
protectedinherited
ComputationInfo m_info
mutableprotectedinherited
int m_initisOk
protectedinherited
Matrix<Index,Dynamic,1> m_invp
mutableprotectedinherited
Matrix<int,IPARM_SIZE,1> m_iparm
mutableprotectedinherited
bool m_isInitialized
protectedinherited
pastix_data_t* m_pastixdata
mutableprotectedinherited
Matrix<Index,Dynamic,1> m_perm
mutableprotectedinherited
int m_size
mutableprotectedinherited
bool m_structureIsUptodate
protected
ColSpMatrix m_transposedStructure
protected

The documentation for this class was generated from the following file: