-
Notifications
You must be signed in to change notification settings - Fork 18
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 EP: convergence sometimes lacking #114
Comments
Looks like something is not entirely stable, if you restrict to fewer eigenpairs it's fine. Does the transformation Other solves presumably preserve symmetry better, or so? |
The first matrix is singular (six eigenvalues are zero), hence I shift. There are repeated eigenvalues. Are vectors normalized with respect to the second matrix anywhere? I use this code:
|
Can you compare with |
I'm afraid I don't quite follow what it is is you want me to do. |
If I understand correctly you're transforming a symmetric generalized eigenproblem into a non-symmetric standard eigenproblem, like this:
And then you use ArnoldiMethod (basically the Krylov-Schur algorithm) to solve this non-symmetric problem. That's probably different from how Arpack.jl (or whatever the package is) solves the generalized eigenproblem, as they might do Lanczos iteration with a B-inner product, or something along those lines, which may converge better or not, or have a different stopping criterion, etc. So to check if this is a bug in ArnoldiMethod, my question is if you can feed this ^ non-symmetric standard eigenproblem to Arpack / KrylovKit and see if it's giving the same output. If so the problem might be with the matrix, and if not then it's likely a bug / instability in ArnoldiMethod. Otherwise I don't see how to narrow it down. |
Okay, now I see. Well, I believe matlab uses the same algorithm and converges just fine. |
I think I misunderstood the example in https://julialinearalgebra.github.io/ArnoldiMethod.jl/stable/usage/02_spectral_transformations.html |
I added the orthogonalization. However, occasionally I run into problems. It appears to be random (initial guesses of the eigenspaces?) During testing I got this error:
|
I switched to a symmetric version of the shift-and-invert standard eigenvalue problem. I'm still having trouble with accuracy. For instance, partialschur claims to have converged on three eigenvalues:
However, all three should be 3.94784e-01. If you have some time, have a look at the output of the test of the package. |
@haampie Could you give me some pointers how to control the accuracy please? Thanks. |
Hi @PetrKryslUCSD, as you can see I haven't touched the code much in the last 5 years, so would have to make time to look into the issue. The method is a subspace method: a subspace is expanded iteratively until large enough, then the eigenproblem is projected to it, which involves doing a small dense Schur factorization. Then the subspace is reduced in size, retaining only the best approximate eigenvectors to eigenvalues of interest, and expanded again... etc. Possible sources of issue:
If that is too involved, simple things you can do: compare the number of iterations with other packages implementing roughly the same algorithm. If ArnoldiMethod takes fewer, maybe something is different with the stopping criterion. |
@PetrKryslUCSD looks like increasing For debugging I used:
and you can see that the QR decomp has large error with default |
Let's close as duplicate of #112, it's likely the same problem. |
I wish I could say that the problem was fixed, but while the eigenvalues are now coming out okay (I increased the limit to |
An eigenvalue problem is solved with Arpack and ArnoldiMethod. The eigenvalues agree, the eigenvectors do not.
The "info" prints orthogonality checks and the residual norm. Clearly the modes are not mass orthogonal for the ArnoldiMethod.jl computation.
The orthogonality checks begin on line https://github.com/PetrKryslUCSD/FinEtoolsDeforLinear.jl/blob/d44694b9829a4feb2755c89341ac5207f9e7d0ef/examples/dynamics/free_vibration/3-d/unit_cube_mode_examples.jl#L55
The residual is ten orders of magnitude bigger for ArnoldiMethod.jl.
The EP computation is implemented in https://github.com/PetrKryslUCSD/GEPHelpers.jl.git.
I may be misunderstanding something, but I tried to reproduce the example from the ArnoldiMethod.jl documentation exactly.
The text was updated successfully, but these errors were encountered: