-
Notifications
You must be signed in to change notification settings - Fork 130
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
Generalized Eigenvalues #1
Comments
Hi Yixuan, any update on this? |
Ah, sorry for the slow progress on this. When I find some free time I'll catch up. |
Nice work. |
One thing I was struggling with is how to design the API of generalized solver: there are many different modes to compute the generalized eigenvalues, according to ARPACK manual. How to unify these interfaces is a problem. Maybe I should learn some design from ARPACK++, or do you have any suggestions? @skn123 @Barry845 |
I think a simple API would suffice. LHS matrix and a RHS matrix |
Hi @yixuan |
Hi @manusethi , please see the comments below. |
Thanks @yixuan. However, I do not want to invert the matrix. Both my matrices are sparse and inverting one of them will make it dense. |
Computing generalized eigenvalue does require some form of matrix inversion, either on the A matrix or on the B matrix. For sparse matrix there is a sparse Cholesky decomposition algorithm, which in Eigen is done by the SimplicialLLT solver. Actually I have already written a generalized eigen solver using Cholesky decomposition, but the documentation is not ready yet. |
Thanks @yixuan, I appreciate it indeed! Could you help me with calling the eigs function for this class or provide a brief documentation? I am having some problem providing the cholesky decomposition. |
How do you store your sparse matrix? You may want to convert it to an Eigen sparse matrix, and then I could show you some sample code. |
Hi @yixuan I have already converted my matrix into a Eigen sparse matrix. I just don't know how to call your function. I get some errors. I tried a few times. Here is what I did:
I didn't really understand how to call so just tried a few things and for sure these wouldn't work. I would greatly appreciate a sample code. Also, does Arpack also take the inverse of the B matrix while computing generalized eigenvalues? |
Hi all, just to let you know that finally I've added a generalized eigen solver to Spectra. The documentation and example code can be found here. This implemented solver is the most basic one, and other more complicated algorithms are under development, but I think it can already solve a large number of symmetric generalized eigenvalue problems. @manusethi, ARPACK also requires you to implement the operation |
Hi @yixuan. Thank you very much. BTW regarding the inverse, I have been using ARPACK++. As per their documentation I didn't need to program the inverse of B matrix. But probably they are taking the inverse like what you have described. |
Hi @yixuan I just tried your code and it worked great! Now I no longer have to deal with Arpack++ and other dependencies like SuperLU, Umfpack, BLAS etc which were creating a lot of problems for me when using with my MPI based code. Thank you so much! |
Glad to hear that! |
Hey @yixuan |
@TerranRush |
Yes, just as the ARPACK buckling mode. |
@TerranRush |
@yixuan |
It depends on whether you want to calculate the largest (or smallest) generalized eigenvalues, or the ones that are closest (or farthest) to some given number |
Add virtual destructor to fix warnings
Hi! |
I also need to calculate the smallest generalized eigenvalues with large |
Finally we used another algorithm. Here you will find our implementation. |
@oberbichler Thanks for the pointer. I'm also trying to learn new algorithms that better fit such problems. |
Anna Araslanova (LOBPCG algorithm) is already available in contributed and should likely be faster. You might want to give it a try. |
Thanks for the hint! A lot of compiling errors... still WIP? |
Yeah, sorry about that... |
👍 Would be nice to check the perfomance with large systems. After fixing the compile time errors it drops a runtime error (invalid matrix product). I will wait for the next release 😛 |
For people who are still interested, Note that this new branch contains several API-breaking changes that will be included in the next major release, so some (minor) code migration is needed. |
I think it is ready to close this issue now, as Spectra v1.0.0 has been released and generalized eigenvalues are fully supported. It is also funny to see how long I took to close the very first issue of Spectra. 😆 |
Moved from yixuan/arpack-eigen#2
The text was updated successfully, but these errors were encountered: