Eigen::PastixLDLT< MatrixType_, UpLo_ > Class Template Reference

A sparse direct supernodal Cholesky (LLT) factorization and solver based on the PaStiX library. More...

#include <PaStiXSupport.h>

+ Inheritance diagram for Eigen::PastixLDLT< MatrixType_, UpLo_ >:

Public Types

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

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

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

Additional Inherited Members

- Protected Types inherited from Eigen::PastixBase< PastixLDLT< MatrixType_, UpLo_ > >
typedef SparseSolverBase< PastixLDLT< MatrixType_, UpLo_ > > Base
 

Detailed Description

template<typename MatrixType_, int UpLo_>
class Eigen::PastixLDLT< MatrixType_, UpLo_ >

A sparse direct supernodal Cholesky (LLT) factorization and solver based on the PaStiX library.

This class is used to solve the linear systems A.X = B via a LDL^T supernodal Cholesky factorization available in the PaStiX library. The matrix A should be symmetric and positive definite WARNING Selfadjoint complex matrices are not supported in the current version of PaStiX 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<>
UpLoThe part of the matrix to use : Lower or Upper. The default is Lower as required by PaStiX

\implsparsesolverconcept

See also
Sparse solver concept, class SimplicialLDLT

Member Typedef Documentation

◆ Base

template<typename MatrixType_ , int UpLo_>
typedef PastixBase<PastixLDLT<MatrixType, UpLo_> > Eigen::PastixLDLT< MatrixType_, UpLo_ >::Base

◆ ColSpMatrix

template<typename MatrixType_ , int UpLo_>
typedef Base::ColSpMatrix Eigen::PastixLDLT< MatrixType_, UpLo_ >::ColSpMatrix

◆ MatrixType

template<typename MatrixType_ , int UpLo_>
typedef MatrixType_ Eigen::PastixLDLT< MatrixType_, UpLo_ >::MatrixType

Member Enumeration Documentation

◆ anonymous enum

template<typename MatrixType_ , int UpLo_>
anonymous enum
Enumerator
UpLo 
579 { UpLo = UpLo_ };
@ UpLo
Definition: PaStiXSupport.h:579

Constructor & Destructor Documentation

◆ PastixLDLT() [1/2]

template<typename MatrixType_ , int UpLo_>
Eigen::PastixLDLT< MatrixType_, UpLo_ >::PastixLDLT ( )
inline
580 : Base() { init(); }
PastixBase< PastixLDLT< MatrixType, UpLo_ > > Base
Definition: PaStiXSupport.h:575
void init()
Definition: PaStiXSupport.h:617

References Eigen::PastixLDLT< MatrixType_, UpLo_ >::init().

◆ PastixLDLT() [2/2]

template<typename MatrixType_ , int UpLo_>
Eigen::PastixLDLT< MatrixType_, UpLo_ >::PastixLDLT ( const MatrixType matrix)
inlineexplicit
582  : Base() {
583  init();
584  compute(matrix);
585  }
void compute(const MatrixType &matrix)
Definition: PaStiXSupport.h:590
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor >, 0, Eigen::OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition: common.h:85

References Eigen::PastixLDLT< MatrixType_, UpLo_ >::compute(), Eigen::PastixLDLT< MatrixType_, UpLo_ >::init(), and matrix().

Member Function Documentation

◆ analyzePattern()

template<typename MatrixType_ , int UpLo_>
void Eigen::PastixLDLT< MatrixType_, UpLo_ >::analyzePattern ( const MatrixType matrix)
inline

Compute the LDL^T symbolic factorization of matrix using its sparsity pattern The result of this operation can be used with successive matrices having the same pattern as matrix

See also
factorize()
600  {
601  ColSpMatrix temp;
602  grabMatrix(matrix, temp);
603  Base::analyzePattern(temp);
604  }
void analyzePattern(ColSpMatrix &mat)
Definition: PaStiXSupport.h:304
Base::ColSpMatrix ColSpMatrix
Definition: PaStiXSupport.h:576
void grabMatrix(const MatrixType &matrix, ColSpMatrix &out)
Definition: PaStiXSupport.h:622

References Eigen::PastixBase< Derived >::analyzePattern(), Eigen::PastixLDLT< MatrixType_, UpLo_ >::grabMatrix(), and matrix().

◆ compute()

template<typename MatrixType_ , int UpLo_>
void Eigen::PastixLDLT< MatrixType_, UpLo_ >::compute ( const MatrixType matrix)
inline

Compute the L and D factors of the LDL^T factorization of matrix

See also
analyzePattern() factorize()
590  {
591  ColSpMatrix temp;
592  grabMatrix(matrix, temp);
593  Base::compute(temp);
594  }
void compute(ColSpMatrix &mat)
Definition: PaStiXSupport.h:294

References Eigen::PastixBase< Derived >::compute(), Eigen::PastixLDLT< MatrixType_, UpLo_ >::grabMatrix(), and matrix().

Referenced by Eigen::PastixLDLT< MatrixType_, UpLo_ >::PastixLDLT().

◆ factorize()

template<typename MatrixType_ , int UpLo_>
void Eigen::PastixLDLT< MatrixType_, UpLo_ >::factorize ( const MatrixType matrix)
inline

Compute the LDL^T supernodal numerical factorization of matrix

608  {
609  ColSpMatrix temp;
610  grabMatrix(matrix, temp);
611  Base::factorize(temp);
612  }
void factorize(ColSpMatrix &mat)
Definition: PaStiXSupport.h:330

References Eigen::PastixBase< Derived >::factorize(), Eigen::PastixLDLT< MatrixType_, UpLo_ >::grabMatrix(), and matrix().

◆ grabMatrix()

template<typename MatrixType_ , int UpLo_>
void Eigen::PastixLDLT< MatrixType_, UpLo_ >::grabMatrix ( const MatrixType matrix,
ColSpMatrix out 
)
inlineprotected
622  {
623  // Pastix supports only lower, column-major matrices
624  out.resize(matrix.rows(), matrix.cols());
625  out.template selfadjointView<Lower>() = matrix.template selfadjointView<UpLo>();
627  }
void c_to_fortran_numbering(MatrixType &mat)
Definition: PaStiXSupport.h:132
std::ofstream out("Result.txt")

References Eigen::internal::c_to_fortran_numbering(), matrix(), and out().

Referenced by Eigen::PastixLDLT< MatrixType_, UpLo_ >::analyzePattern(), Eigen::PastixLDLT< MatrixType_, UpLo_ >::compute(), and Eigen::PastixLDLT< MatrixType_, UpLo_ >::factorize().

◆ init()

template<typename MatrixType_ , int UpLo_>
void Eigen::PastixLDLT< MatrixType_, UpLo_ >::init ( )
inlineprotected
617  {
618  m_iparm(IPARM_SYM) = API_SYM_YES;
619  m_iparm(IPARM_FACTORIZATION) = API_FACT_LDLT;
620  }
Array< int, IPARM_SIZE, 1 > m_iparm
Definition: PaStiXSupport.h:250

References Eigen::PastixLDLT< MatrixType_, UpLo_ >::m_iparm.

Referenced by Eigen::PastixLDLT< MatrixType_, UpLo_ >::PastixLDLT().

Member Data Documentation

◆ m_iparm

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

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