Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7127 Discussions

How to obtain the L matrix after performing Cholesky decomposition using the Eigen::PardisoLLT ?

ShowBeOne
Beginner
399 Views

Hello, I am a C++ programmer currently engaged in research on efficient simulation algorithms. In my research, I frequently use the following code snippet:

----------------------------------------

Eigen::SparseMatrix<double> A;

// Initialize A ...

Eigen::PardisoLLT<Eigen::SparseMatrix<double>> solver;

solver.compute(A);

-----------------------------------------

Then, I need to access the lower triangular matrix L from the Cholesky decomposition of A in order to perform further calculations. Therefore, I naturally wrote the following code for the next step:

-----------------------------------------

Eigen::SpaseMatrix<double> L = solver.getMatrixL();

----------------------------------------

Unfortunately, I found that the Eigen::PardisoLLT class does not provide an API for this. Therefore, I would like to ask how I can obtain the lower triangular matrix L from the Cholesky decomposition performed using Eigen::PardisoLLT<Eigen::SparseMatrix<double>>. (Note that, in pursuit of high computational efficiency, I chose to use the Eigen::PardisoLLT solver. I noticed that with less efficient solvers like Eigen::LLT, it is possible to directly obtain the lower triangular matrix L. However, such less efficient solvers are not suitable for my research. Therefore, I must use high-efficiency solvers like Eigen::PardisoLLT.)

 

 

 

Labels (1)
0 Kudos
2 Replies
Mark_L_Intel
Moderator
286 Views

Hello @ShowBeOne,

 

 The Eigen::PardisoLLT solver is indeed designed for efficiency with sparse matrices and utilizes the Pardiso library under the hood. While it provides methods to solve systems and perform factorizations, I'm not sure if it exposes the triangular factors directly through its API. You could try Eigen::SimplicialLLT for L matrix extraction but it sounds like that's not what you'd like to do. I will ask our developers for comments on your request. 

 

 

0 Kudos
ShowBeOne
Beginner
262 Views

Thank you very much for the detailed explanation of PardisoLLT! I have indeed tried using Eigen::SimplicialLLT to extract the L matrix, but as I mentioned in my original question, the decomposition efficiency of Eigen::SimplicialLLT is far lower than that of Eigen::PardisoLLT, making it unsuitable for my research. Therefore, I am eagerly looking forward to the development team's evaluation and feedback regarding my needs.

0 Kudos
Reply