m-reuter / arpackpp

Arpack++ with patches (C++ interface to ARPACK)
Other
62 stars 26 forks source link

Error while using ARNonSymStdEig #4

Closed thewoz closed 8 years ago

thewoz commented 8 years ago

Hi I'm Leonardo,

I'm writing a project using arpack++ to find the eigenvector and eigenvalue of an Laplacian matrix.

https://en.wikipedia.org/wiki/Laplacian_matrix

I standardized the matrix in order to have a symmetric matrix (L_sym) and use it in the ARmStrong class. And everything works.

Then, for different reason, I had to take the same matrix and written it in the form of a real non symmetric matrix (L_rw). In this case I used the ARSymStdEig class. And on the same input the program, on several runs, give me as result right and wrong in a randomly way.

My first reaction was to think that my program was poorly written and then I went to see how the example nsymreg works. And I noticed that changing the number of the request eigenvalue or the tolerance or the mcv the result change. i.e. the order of the eigenvalue are wrong or they are completely different.

I really don't know what to do.

ps: sorry for my english

m-reuter commented 8 years ago

About the potential bug, it would be helpful if you can provide an example so we can replicate the problem (i.e. what modification in the standard example leads to exactly what differences, what is the command line you used etc).

Also note, Laplacian matrices are always symmetric, without the need to 'standardize'. It may be that you have a general Eigenvalue problem (Ax = lambda Bx) where B is either sparse and symmetric (FEM) or diagonal (mass lumping or some mesh/graph Laplace operators). In both cases solve the generalized problem, do not invert B.

m-reuter commented 8 years ago

I just looked at the areig/ansymreg example and changing the number of requested eigenvalues does not change the results (it computes more, but the earlier ones are identical). I cannot replicate this problem. Please give an explicit example and specify what operating system you are using.