Eigen::PardisoLDLT< MatrixType, Options > Class Template Reference

A sparse direct Cholesky (LDLT) factorization and solver based on the PARDISO library. More...

#include <PardisoSupport.h>

+ Inheritance diagram for Eigen::PardisoLDLT< MatrixType, Options >:

Public Types

enum  { UpLo = Options & (Upper | Lower) }
 
typedef Base::Scalar Scalar
 
typedef Base::RealScalar RealScalar
 
typedef Base::StorageIndex StorageIndex
 
- Public Types inherited from Eigen::PardisoImpl< PardisoLDLT< MatrixType, Options > >
enum  
 
typedef Traits::MatrixType MatrixType
 
typedef Traits::Scalar Scalar
 
typedef Traits::RealScalar RealScalar
 
typedef Traits::StorageIndex StorageIndex
 
typedef SparseMatrix< Scalar, RowMajor, StorageIndexSparseMatrixType
 
typedef Matrix< Scalar, Dynamic, 1 > VectorType
 
typedef Matrix< StorageIndex, 1, MatrixType::ColsAtCompileTime > IntRowVectorType
 
typedef Matrix< StorageIndex, MatrixType::RowsAtCompileTime, 1 > IntColVectorType
 
typedef Array< StorageIndex, 64, 1, DontAlign > ParameterType
 

Public Member Functions

 PardisoLDLT ()
 
 PardisoLDLT (const MatrixType &matrix)
 
void getMatrix (const MatrixType &matrix)
 
- Public Member Functions inherited from Eigen::PardisoImpl< PardisoLDLT< MatrixType, Options > >
 PardisoImpl ()
 
 ~PardisoImpl ()
 
Index cols () const
 
Index rows () const
 
ComputationInfo info () const
 Reports whether previous computation was successful. More...
 
ParameterTypepardisoParameterArray ()
 
PardisoLDLT< MatrixType, Options > & analyzePattern (const MatrixType &matrix)
 
PardisoLDLT< MatrixType, Options > & factorize (const MatrixType &matrix)
 
PardisoLDLT< MatrixType, Options > & compute (const MatrixType &matrix)
 
void _solve_impl (const MatrixBase< Rhs > &b, MatrixBase< Dest > &dest) const
 
void _solve_impl (const MatrixBase< BDerived > &b, MatrixBase< XDerived > &x) const
 
void _solve_impl (const SparseMatrixBase< Rhs > &b, SparseMatrixBase< Dest > &dest) const
 
- 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 Types

typedef PardisoImpl< PardisoLDLT< MatrixType, Options > > Base
 
- Protected Types inherited from Eigen::PardisoImpl< PardisoLDLT< MatrixType, Options > >
typedef SparseSolverBase< PardisoLDLT< MatrixType, Options > > Base
 
typedef internal::pardiso_traits< PardisoLDLT< MatrixType, Options > > Traits
 

Friends

class PardisoImpl< PardisoLDLT< MatrixType, Options > >
 

Additional Inherited Members

- Protected Member Functions inherited from Eigen::PardisoImpl< PardisoLDLT< MatrixType, Options > >
void pardisoRelease ()
 
void pardisoInit (int type)
 
void manageErrorCode (Index error) const
 
PardisoLDLT< MatrixType, Options > & derived ()
 
const PardisoLDLT< MatrixType, Options > & derived () const
 
- Protected Attributes inherited from Eigen::PardisoImpl< PardisoLDLT< MatrixType, Options > >
SparseMatrixType m_matrix
 
ComputationInfo m_info
 
bool m_analysisIsOk
 
bool m_factorizationIsOk
 
StorageIndex m_type
 
StorageIndex m_msglvl
 
void * m_pt [64]
 
ParameterType m_iparm
 
IntColVectorType m_perm
 
Index m_size
 
bool m_isInitialized
 
- Protected Attributes inherited from Eigen::SparseSolverBase< Derived >
bool m_isInitialized
 

Detailed Description

template<typename MatrixType, int Options>
class Eigen::PardisoLDLT< MatrixType, Options >

A sparse direct Cholesky (LDLT) factorization and solver based on the PARDISO library.

This class allows to solve for A.X = B sparse linear problems via a LDL^T Cholesky factorization using the Intel MKL PARDISO library. The sparse matrix A is assumed to be selfajoint and positive definite. For complex matrices, A can also be symmetric only, see the Options template parameter. The vectors or matrices X and B can be either dense or sparse.

By default, it runs in in-core mode. To enable PARDISO's out-of-core feature, set:

solver.pardisoParameterArray()[59] = 1;
BiCGSTAB< SparseMatrix< double > > solver
Definition: BiCGSTAB_simple.cpp:5
Template Parameters
MatrixTypethe type of the sparse matrix A, it must be a SparseMatrix<>
Optionscan be any bitwise combination of Upper, Lower, and Symmetric. The default is Upper, meaning only the upper triangular part has to be used. Symmetric can be used for symmetric, non-selfadjoint complex matrices, the default being to assume a selfadjoint matrix. Upper|Lower can be used to tell both triangular parts can be used as input.

\implsparsesolverconcept

See also
Sparse solver concept, class SimplicialLDLT

Member Typedef Documentation

◆ Base

template<typename MatrixType , int Options>
typedef PardisoImpl<PardisoLDLT<MatrixType, Options> > Eigen::PardisoLDLT< MatrixType, Options >::Base
protected

◆ RealScalar

template<typename MatrixType , int Options>
typedef Base::RealScalar Eigen::PardisoLDLT< MatrixType, Options >::RealScalar

◆ Scalar

template<typename MatrixType , int Options>
typedef Base::Scalar Eigen::PardisoLDLT< MatrixType, Options >::Scalar

◆ StorageIndex

template<typename MatrixType , int Options>
typedef Base::StorageIndex Eigen::PardisoLDLT< MatrixType, Options >::StorageIndex

Member Enumeration Documentation

◆ anonymous enum

template<typename MatrixType , int Options>
anonymous enum
Enumerator
UpLo 
479 { UpLo = Options & (Upper | Lower) };
@ UpLo
Definition: PardisoSupport.h:479
@ Lower
Definition: Constants.h:211
@ Upper
Definition: Constants.h:213

Constructor & Destructor Documentation

◆ PardisoLDLT() [1/2]

template<typename MatrixType , int Options>
Eigen::PardisoLDLT< MatrixType, Options >::PardisoLDLT ( )
inline
481 : Base() { pardisoInit(Base::ScalarIsComplex ? (bool(Options & Symmetric) ? 6 : -4) : -2); }
@ ScalarIsComplex
Definition: PardisoSupport.h:120
void pardisoInit(int type)
Definition: PardisoSupport.h:182
PardisoImpl< PardisoLDLT< MatrixType, Options > > Base
Definition: PardisoSupport.h:469
@ Symmetric
Definition: Constants.h:229

References Eigen::PardisoImpl< PardisoLDLT< MatrixType, Options > >::pardisoInit(), Eigen::PardisoImpl< PardisoLDLT< MatrixType, Options > >::ScalarIsComplex, and Eigen::Symmetric.

◆ PardisoLDLT() [2/2]

template<typename MatrixType , int Options>
Eigen::PardisoLDLT< MatrixType, Options >::PardisoLDLT ( const MatrixType matrix)
inlineexplicit
483  : Base() {
484  pardisoInit(Base::ScalarIsComplex ? (bool(Options & Symmetric) ? 6 : -4) : -2);
485  compute(matrix);
486  }
PardisoLDLT< MatrixType, Options > & compute(const MatrixType &matrix)
Definition: PardisoSupport.h:245
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::PardisoImpl< PardisoLDLT< MatrixType, Options > >::compute(), matrix(), Eigen::PardisoImpl< PardisoLDLT< MatrixType, Options > >::pardisoInit(), Eigen::PardisoImpl< PardisoLDLT< MatrixType, Options > >::ScalarIsComplex, and Eigen::Symmetric.

Member Function Documentation

◆ getMatrix()

template<typename MatrixType , int Options>
void Eigen::PardisoLDLT< MatrixType, Options >::getMatrix ( const MatrixType matrix)
inline
488  {
489  // PARDISO supports only upper, row-major matrices
490  PermutationMatrix<Dynamic, Dynamic, StorageIndex> p_null;
491  m_matrix.resize(matrix.rows(), matrix.cols());
492  m_matrix.template selfadjointView<Upper>() = matrix.template selfadjointView<UpLo>().twistedBy(p_null);
494  }
SparseMatrixType m_matrix
Definition: PardisoSupport.h:234
void makeCompressed()
Definition: SparseMatrix.h:589
void resize(Index rows, Index cols)
Definition: SparseMatrix.h:734

References Eigen::PardisoImpl< PardisoLDLT< MatrixType, Options > >::m_matrix, Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::makeCompressed(), matrix(), and Eigen::SparseMatrix< Scalar_, Options_, StorageIndex_ >::resize().

Friends And Related Function Documentation

◆ PardisoImpl< PardisoLDLT< MatrixType, Options > >

template<typename MatrixType , int Options>
friend class PardisoImpl< PardisoLDLT< MatrixType, Options > >
friend

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