Closed xpgo closed 4 years ago
I found the answer finally. For whom encounters the same problem: since C^-1 is not symmetric any more, we can not use symmetric related solver, we need to use GenEigsSolver.
Good catch. Thanks for sharing these experiences!
Dear yixuan,
Thank you very much for developing the package as a c++ alternative of ARPACK. It helps me a lot. Currently, I am using SPECTRA to solve the frequency problem in Finite Element Method.
Say, K u = v M u, where K is the stiffness matrix, M is the mass matrix, v and u are eigen pairs.
In order to find some smallest eigen values for the system, I created an OP for the shift-invet mode to solve the equivalent problem: (K - s B)^-1 B u = q u, let C = K - s B, by using SparseLU:
It works and very fast. However, the results are always different from that obtained from ARPACK computaiton, for example:
We can see that, the first several values are acceptable, but it get worse as the frequecies increase, also the eigen vectors become worse.
I tried to improve the results by changing the tolenrance parameter in the compute() function. However, it hardly affect the results. Did I missed something? or is there any way I can improve the results?
I appreciate if you could give some hint. Thank you.