Registered Member
|
Hi, I am trying to use an iterative solver but am running into a few problems. Maybe on my end. Specifically I would like to use the IncompleteLUT class as a preconditioner. But I cannot perform the factorisation in my case
Consider the following pseudo code
However this fails with a lot of errors, ending with /home/tirons/src/eigen/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h:265:69: error: 'const class Eigen::SparseSelfAdjointView<Eigen::SparseMatrix<std::complex<double>, 0, int>, 2u>' has no member named 'nonZeros' On a somewhat related note. Trying to use the BiCGSTab iterative solver on my symmetric, non-Hermitian matrix does not seem possible without storing both parts.
Also fails to compile with errors /home/tirons/src/eigen/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h:103:12: note: no known conversion for argument 1 from 'Eigen::SparseSelfAdjointView<Eigen::SparseMatrix<std::complex<double>, 0, int>, 2u>' to 'const MatrixType& {aka const Eigen::SparseMatrix<std::complex<double>, 0, int>&}' I can make a copy so that it will be a const
And this compiles fine. But I'd like to avoid this copy for obvious reasons. Am I doing something wrong? Is there a way to perform an ILU decomposition on a Symmetric matrix. I can't do a Cholesky due to non-Hermitian nature. I would also like to limit the fill in. This is just for use as a preconditioner. Thanks for any insight. |
Registered Member
|
I should mention I can get around the ILUT decomposition in the same way
Works fine. But I'd like to avoid the deep copy and 2X replication. |
Registered Member
|
Yes I'm afraid ILUT requires the full matrix.
Note that you don't have to create separately the solver and the preconditioner. The best way is like
|
Registered Member
|
Thanks for the reply.
As I dig into the source code for CongugateGradient and BiCGSTAB I notice that ConjugateGradient actually calls the underlying internal conjugate_gradient with a call like
But I don't really understand the mp_matrix->template selfadjointView<UpLo>() syntax. Is there some way that I could do something similar with BiCGSTAB or IncompleteLUT? Because how ever this works, it allow the selfadjointView to be passed to a function that is expecting a const reference. Which is exactly the problem I am having. I realize that my use case may be sort of isolated, but it seems like there is no underlying reason why this should not work other than the author of the code thinking (reasonably) that no one using BiCGSTAB would be dealing with a symmetric matrix. Thanks in advance. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]