-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shifted inverse iteration example #133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very nice job!
Not sure where, but I feel this would also be a nice general routine part of the library. Obviously, it does not really fit the "linear operator" scheme... |
It may fit the factory scheme. If you look at the eigenvalue decomposition The only problem is what to do if the matrix is not normal, so V does not have to be orthogonal. Then, one could do a low-rank approximation as Concerning inverse iterations specifically, not sure we want to have it - it's not a very robust algorithm. It can only find 1 eigenvalue, and only if it's unique. Do people actually need this in practice, or would you always do something a bit more advanced? The natural next step would be to iterate a multidimensional subspace (leading to QR iterations if adding the full domain, not sure if there's an equivalent for sparse). I'll create an issue later today to have a place to discuss how we may introduce eigensolvers to Ginkgo. |
15a1f53
to
9fc0013
Compare
I was afraid to test it, but everything seems to work like a charm in complex arithmetic (even though the unit tests only check |
As promised, here is an example which uses the newly added linear combination support (#131). It implements the shifted inverse iteration method which needs to solve a system with (A - zI) in each iteration. For the stopping criterion, we need multiplication with A, so both matrices are needed. To avoid storing the matrix twice (and enable the solution of a linear system no matter in what format A is stored), we use
gko::Combination
to represent (A - zI).TODO: