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

A supernodal Cholesky (LLT) factorization and solver based on Cholmod. More...

#include <CholmodSupport.h>

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

Public Types

typedef MatrixType_ MatrixType
 
typedef MatrixType::Scalar Scalar
 
typedef MatrixType::RealScalar RealScalar
 
typedef MatrixType::StorageIndex StorageIndex
 
- Public Types inherited from Eigen::CholmodBase< MatrixType_, Lower, CholmodSupernodalLLT< MatrixType_, Lower > >
enum  
 
enum  
 
typedef MatrixType_ MatrixType
 
typedef MatrixType::Scalar Scalar
 
typedef MatrixType::RealScalar RealScalar
 
typedef MatrixType CholMatrixType
 
typedef MatrixType::StorageIndex StorageIndex
 

Public Member Functions

 CholmodSupernodalLLT ()
 
 CholmodSupernodalLLT (const MatrixType &matrix)
 
 ~CholmodSupernodalLLT ()
 
MatrixType matrixL () const
 
MatrixType matrixU () const
 
- Public Member Functions inherited from Eigen::CholmodBase< MatrixType_, Lower, CholmodSupernodalLLT< MatrixType_, Lower > >
 CholmodBase ()
 
 CholmodBase (const MatrixType &matrix)
 
 ~CholmodBase ()
 
StorageIndex cols () const
 
StorageIndex rows () const
 
ComputationInfo info () const
 Reports whether previous computation was successful. More...
 
CholmodSupernodalLLT< MatrixType_, Lower > & compute (const MatrixType &matrix)
 
void analyzePattern (const MatrixType &matrix)
 
void factorize (const MatrixType &matrix)
 
cholmod_common & cholmod ()
 
void _solve_impl (const MatrixBase< Rhs > &b, MatrixBase< Dest > &dest) const
 
void _solve_impl (const SparseMatrixBase< RhsDerived > &b, SparseMatrixBase< DestDerived > &dest) const
 
CholmodSupernodalLLT< MatrixType_, Lower > & setShift (const RealScalar &offset)
 
Scalar determinant () const
 
Scalar logDeterminant () const
 
void dumpMemory (Stream &)
 
- 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 ()
 
- Protected Member Functions inherited from Eigen::CholmodBase< MatrixType_, Lower, CholmodSupernodalLLT< MatrixType_, Lower > >
CholmodSupernodalLLT< MatrixType_, Lower > & derived ()
 
const CholmodSupernodalLLT< MatrixType_, Lower > & derived () const
 

Private Types

typedef CholmodBase< MatrixType_, UpLo_, CholmodSupernodalLLTBase
 

Private Attributes

cholmod_common m_cholmod
 

Additional Inherited Members

- Protected Types inherited from Eigen::CholmodBase< MatrixType_, Lower, CholmodSupernodalLLT< MatrixType_, Lower > >
typedef SparseSolverBase< CholmodSupernodalLLT< MatrixType_, Lower > > Base
 
- Protected Attributes inherited from Eigen::CholmodBase< MatrixType_, Lower, CholmodSupernodalLLT< MatrixType_, Lower > >
cholmod_common m_cholmod
 
cholmod_factor * m_cholmodFactor
 
double m_shiftOffset [2]
 
ComputationInfo m_info
 
int m_factorizationIsOk
 
int m_analysisIsOk
 
bool m_isInitialized
 
- Protected Attributes inherited from Eigen::SparseSolverBase< Derived >
bool m_isInitialized
 

Detailed Description

template<typename MatrixType_, int UpLo_ = Lower>
class Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >

A supernodal Cholesky (LLT) factorization and solver based on Cholmod.

This class allows to solve for A.X = B sparse linear problems via a supernodal LL^T Cholesky factorization using the Cholmod library. This supernodal variant performs best on dense enough problems, e.g., 3D FEM, or very high order 2D FEM. The sparse matrix A must be selfadjoint and positive definite. 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<>
UpLo_the triangular part that will be used for the computations. It can be Lower or Upper. Default is Lower.

\implsparsesolverconcept

This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed.

Warning
Only double precision real and complex scalar types are supported by Cholmod.
See also
Sparse solver concept

Member Typedef Documentation

◆ Base

template<typename MatrixType_ , int UpLo_ = Lower>
typedef CholmodBase<MatrixType_, UpLo_, CholmodSupernodalLLT> Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::Base
private

◆ MatrixType

template<typename MatrixType_ , int UpLo_ = Lower>
typedef MatrixType_ Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::MatrixType

◆ RealScalar

template<typename MatrixType_ , int UpLo_ = Lower>
typedef MatrixType::RealScalar Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::RealScalar

◆ Scalar

template<typename MatrixType_ , int UpLo_ = Lower>
typedef MatrixType::Scalar Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::Scalar

◆ StorageIndex

template<typename MatrixType_ , int UpLo_ = Lower>
typedef MatrixType::StorageIndex Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::StorageIndex

Constructor & Destructor Documentation

◆ CholmodSupernodalLLT() [1/2]

template<typename MatrixType_ , int UpLo_ = Lower>
Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::CholmodSupernodalLLT ( )
inline
634 : Base() { init(); }
CholmodBase< MatrixType_, UpLo_, CholmodSupernodalLLT > Base
Definition: CholmodSupport.h:625
void init()
Definition: CholmodSupport.h:657

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

◆ CholmodSupernodalLLT() [2/2]

template<typename MatrixType_ , int UpLo_ = Lower>
Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::CholmodSupernodalLLT ( const MatrixType matrix)
inline
636  : Base() {
637  init();
638  this->compute(matrix);
639  }
CholmodSupernodalLLT< MatrixType_, Lower > & compute(const MatrixType &matrix)
Definition: CholmodSupport.h:294
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::CholmodBase< MatrixType_, Lower, CholmodSupernodalLLT< MatrixType_, Lower > >::compute(), and Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::init().

◆ ~CholmodSupernodalLLT()

template<typename MatrixType_ , int UpLo_ = Lower>
Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::~CholmodSupernodalLLT ( )
inline
641 {}

Member Function Documentation

◆ init()

template<typename MatrixType_ , int UpLo_ = Lower>
void Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::init ( )
inlineprotected
657  {
658  m_cholmod.final_asis = 1;
659  m_cholmod.supernodal = CHOLMOD_SUPERNODAL;
660  }
cholmod_common m_cholmod
Definition: CholmodSupport.h:460

References Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::m_cholmod.

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

◆ matrixL()

template<typename MatrixType_ , int UpLo_ = Lower>
MatrixType Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::matrixL ( ) const
inline
Returns
an expression of the factor L
644  {
645  // Convert Cholmod factor's supernodal storage format to Eigen's CSC storage format
646  cholmod_sparse* cholmodL = internal::cm_factor_to_sparse(*Base::m_cholmodFactor, m_cholmod);
647  MatrixType L = viewAsEigen<Scalar, StorageIndex>(*cholmodL);
648  internal::cm_free_sparse<StorageIndex>(cholmodL, m_cholmod);
649 
650  return L;
651  }
MatrixXd L
Definition: LLT_example.cpp:6
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
cholmod_factor * m_cholmodFactor
Definition: CholmodSupport.h:461

References L, Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::m_cholmod, and Eigen::CholmodBase< MatrixType_, UpLo_, Derived >::m_cholmodFactor.

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

◆ matrixU()

template<typename MatrixType_ , int UpLo_ = Lower>
MatrixType Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::matrixU ( ) const
inline
Returns
an expression of the factor U (= L^*)
654 { return matrixL().adjoint(); }
MatrixType matrixL() const
Definition: CholmodSupport.h:644

References Eigen::CholmodSupernodalLLT< MatrixType_, UpLo_ >::matrixL().

Member Data Documentation

◆ m_cholmod

template<typename MatrixType_ , int UpLo_ = Lower>
cholmod_common Eigen::CholmodBase< MatrixType_, UpLo_, Derived >::m_cholmod
mutableprivate

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