Eigen::PastixLU< MatrixType_, IsStrSym > Class Template Reference

Interface to the PaStix solver. More...

+ Inheritance diagram for Eigen::PastixLU< MatrixType_, IsStrSym >:

Public Types

typedef PastixBase< PastixLU< MatrixType > > Base
 
typedef Base::ColSpMatrix ColSpMatrix
 
typedef MatrixType_ MatrixType
 
typedef MatrixType::StorageIndex StorageIndex
 
- Public Types inherited from Eigen::PastixBase< PastixLU< MatrixType_ > >
enum  
 
typedef SparseMatrix< Scalar, ColMajor > ColSpMatrix
 
typedef MatrixType_ MatrixType
 
typedef internal::pastix_traits< PastixLU< MatrixType_ > >::MatrixType MatrixType_
 
typedef MatrixType::RealScalar RealScalar
 
typedef MatrixType::Scalar Scalar
 
typedef MatrixType::StorageIndex StorageIndex
 
typedef Matrix< Scalar, Dynamic, 1 > Vector
 

Public Member Functions

void analyzePattern (const MatrixType &matrix)
 
void compute (const MatrixType &matrix)
 
void factorize (const MatrixType &matrix)
 
 PastixLU ()
 
 PastixLU (const MatrixType &matrix)
 
- Public Member Functions inherited from Eigen::PastixBase< PastixLU< MatrixType_ > >
bool _solve_impl (const MatrixBase< Rhs > &b, MatrixBase< Dest > &x) const
 
Index cols () const
 
Array< double, DPARM_SIZE, 1 > & dparm ()
 
double & dparm (int idxparam)
 
ComputationInfo info () const
 Reports whether previous computation was successful. More...
 
Array< StorageIndex, IPARM_SIZE, 1 > & iparm ()
 
int & iparm (int idxparam)
 
 PastixBase ()
 
Index rows () const
 
 ~PastixBase ()
 
- Public Member Functions inherited from Eigen::SparseSolverBase< Derived >
Derived & derived ()
 
const Derived & derived () const
 
template<typename Rhs >
const Solve< Derived, Rhs > solve (const MatrixBase< Rhs > &b) const
 
template<typename Rhs >
const Solve< Derived, Rhs > solve (const SparseMatrixBase< Rhs > &b) const
 
 SparseSolverBase ()
 
 SparseSolverBase (SparseSolverBase &&other)
 
 ~SparseSolverBase ()
 

Protected Member Functions

void grabMatrix (const MatrixType &matrix, ColSpMatrix &out)
 
void init ()
 
- Protected Member Functions inherited from Eigen::PastixBase< PastixLU< MatrixType_ > >
void analyzePattern (ColSpMatrix &mat)
 
void clean ()
 
void compute (ColSpMatrix &mat)
 
PastixLU< MatrixType_ > & derived ()
 
const PastixLU< MatrixType_ > & derived () const
 
void factorize (ColSpMatrix &mat)
 
void init ()
 

Protected Attributes

Array< double, DPARM_SIZE, 1 > m_dparm
 
Array< int, IPARM_SIZE, 1 > m_iparm
 
bool m_structureIsUptodate
 
ColSpMatrix m_transposedStructure
 
- Protected Attributes inherited from Eigen::PastixBase< PastixLU< MatrixType_ > >
int m_analysisIsOk
 
int m_comm
 
Array< double, DPARM_SIZE, 1 > m_dparm
 
int m_factorizationIsOk
 
ComputationInfo m_info
 
int m_initisOk
 
Matrix< StorageIndex, Dynamic, 1 > m_invp
 
Array< int, IPARM_SIZE, 1 > m_iparm
 
bool m_isInitialized
 
pastix_data_t * m_pastixdata
 
Matrix< StorageIndex, Dynamic, 1 > m_perm
 
int m_size
 
- Protected Attributes inherited from Eigen::SparseSolverBase< Derived >
bool m_isInitialized
 

Additional Inherited Members

- Protected Types inherited from Eigen::PastixBase< PastixLU< MatrixType_ > >
typedef SparseSolverBase< PastixLU< MatrixType_ > > Base
 

Detailed Description

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

Interface to the PaStix solver.

Sparse direct LU solver based on PaStiX library.

This class is used to solve the linear systems A.X = B via the PaStix library. The matrix can be either real or complex, symmetric or not.

See also
TutorialSparseDirectSolvers

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
MatrixType_the 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

This class follows the sparse solver concept .

See also
Sparse solver concept, class SparseLU

Definition at line 414 of file PaStiXSupport.h.

Member Typedef Documentation

◆ Base

template<typename MatrixType_ , bool IsStrSym>
typedef PastixBase<PastixLU<MatrixType> > Eigen::PastixLU< MatrixType_, IsStrSym >::Base

Definition at line 418 of file PaStiXSupport.h.

◆ ColSpMatrix

template<typename MatrixType_ , bool IsStrSym>
typedef Base::ColSpMatrix Eigen::PastixLU< MatrixType_, IsStrSym >::ColSpMatrix

Definition at line 419 of file PaStiXSupport.h.

◆ MatrixType

template<typename MatrixType_ , bool IsStrSym>
typedef MatrixType_ Eigen::PastixLU< MatrixType_, IsStrSym >::MatrixType

Definition at line 417 of file PaStiXSupport.h.

◆ StorageIndex

template<typename MatrixType_ , bool IsStrSym>
typedef MatrixType::StorageIndex Eigen::PastixLU< MatrixType_, IsStrSym >::StorageIndex

Definition at line 420 of file PaStiXSupport.h.

Constructor & Destructor Documentation

◆ PastixLU() [1/2]

template<typename MatrixType_ , bool IsStrSym>
Eigen::PastixLU< MatrixType_, IsStrSym >::PastixLU ( )
inline

Definition at line 423 of file PaStiXSupport.h.

423  : Base()
424  {
425  init();
426  }
PastixBase< PastixLU< MatrixType > > Base

◆ PastixLU() [2/2]

template<typename MatrixType_ , bool IsStrSym>
Eigen::PastixLU< MatrixType_, IsStrSym >::PastixLU ( const MatrixType matrix)
inlineexplicit

Definition at line 428 of file PaStiXSupport.h.

428  :Base()
429  {
430  init();
431  compute(matrix);
432  }
void compute(const MatrixType &matrix)

Member Function Documentation

◆ analyzePattern()

template<typename MatrixType_ , bool IsStrSym>
void Eigen::PastixLU< MatrixType_, IsStrSym >::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()

Definition at line 450 of file PaStiXSupport.h.

451  {
452  m_structureIsUptodate = false;
453  ColSpMatrix temp;
454  grabMatrix(matrix, temp);
455  Base::analyzePattern(temp);
456  }
void analyzePattern(ColSpMatrix &mat)
bool m_structureIsUptodate
void grabMatrix(const MatrixType &matrix, ColSpMatrix &out)
Base::ColSpMatrix ColSpMatrix

◆ compute()

template<typename MatrixType_ , bool IsStrSym>
void Eigen::PastixLU< MatrixType_, IsStrSym >::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()

Definition at line 438 of file PaStiXSupport.h.

439  {
440  m_structureIsUptodate = false;
441  ColSpMatrix temp;
442  grabMatrix(matrix, temp);
443  Base::compute(temp);
444  }
void compute(ColSpMatrix &mat)

◆ factorize()

template<typename MatrixType_ , bool IsStrSym>
void Eigen::PastixLU< MatrixType_, IsStrSym >::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()

Definition at line 463 of file PaStiXSupport.h.

464  {
465  ColSpMatrix temp;
466  grabMatrix(matrix, temp);
467  Base::factorize(temp);
468  }
void factorize(ColSpMatrix &mat)

◆ grabMatrix()

template<typename MatrixType_ , bool IsStrSym>
void Eigen::PastixLU< MatrixType_, IsStrSym >::grabMatrix ( const MatrixType matrix,
ColSpMatrix out 
)
inlineprotected

Definition at line 478 of file PaStiXSupport.h.

479  {
480  if(IsStrSym)
481  out = matrix;
482  else
483  {
485  {
486  // update the transposed structure
487  m_transposedStructure = matrix.transpose();
488 
489  // Set the elements of the matrix to zero
490  for (Index j=0; j<m_transposedStructure.outerSize(); ++j)
491  for(typename ColSpMatrix::InnerIterator it(m_transposedStructure, j); it; ++it)
492  it.valueRef() = 0.0;
493 
494  m_structureIsUptodate = true;
495  }
496 
497  out = m_transposedStructure + matrix;
498  }
500  }
ColSpMatrix m_transposedStructure
TransposeReturnType transpose()
Index outerSize() const
Definition: SparseMatrix.h:172
void c_to_fortran_numbering(MatrixType &mat)
Definition: PaStiXSupport.h:99
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:82
std::ptrdiff_t j

◆ init()

template<typename MatrixType_ , bool IsStrSym>
void Eigen::PastixLU< MatrixType_, IsStrSym >::init ( )
inlineprotected

Definition at line 471 of file PaStiXSupport.h.

472  {
473  m_structureIsUptodate = false;
474  m_iparm(IPARM_SYM) = API_SYM_NO;
475  m_iparm(IPARM_FACTORIZATION) = API_FACT_LU;
476  }
Array< int, IPARM_SIZE, 1 > m_iparm

Member Data Documentation

◆ m_dparm

template<typename MatrixType_ , bool IsStrSym>
Array<double,DPARM_SIZE,1> Eigen::PastixBase< Derived >::m_dparm
mutableprotected

Definition at line 250 of file PaStiXSupport.h.

◆ m_iparm

template<typename MatrixType_ , bool IsStrSym>
Array<int,IPARM_SIZE,1> Eigen::PastixBase< Derived >::m_iparm
mutableprotected

Definition at line 249 of file PaStiXSupport.h.

◆ m_structureIsUptodate

template<typename MatrixType_ , bool IsStrSym>
bool Eigen::PastixLU< MatrixType_, IsStrSym >::m_structureIsUptodate
protected

Definition at line 506 of file PaStiXSupport.h.

◆ m_transposedStructure

template<typename MatrixType_ , bool IsStrSym>
ColSpMatrix Eigen::PastixLU< MatrixType_, IsStrSym >::m_transposedStructure
protected

Definition at line 505 of file PaStiXSupport.h.


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