[Trilinos-Users] [Anasazi] getting eigenvectors
홍광우
yuriprime at kaist.ac.kr
Tue May 14 20:52:44 MDT 2013
Dear Trilinos & Anasazi developers and users,
I'm using Anasazi to diagonalize a Epetra_CrsMatrix,
and I tried to get eigenvectors and eigenvalues.
I compared the result from Anasazi with direct diagonalization method (with python numpy.linalg.eig), and found that the eigenvalues are equal, but the eigenvectors are different.
This is a part of my code to get eigenvectors.
---------------------
int dim=10; // matrix dimension
Anasazi::Eigensolution<ScalarType,Epetra_MultiVector> sol = MyProblem->getSolution();
Teuchos::RCP<Epetra_MultiVector> evecs = sol.Evecs;int numev = sol.numVecs;
for(int i=0;i<dim;i++){cout << evecs->operator[](0)[i] << endl;}----------------------
I expected that using the above code, I could get the 0th eigenvector correspond to the 0th eigenvalue (following the rule of Anasazi). However, the printed values are not eigenvectors of any kind. Am I wrong? Please somebody help me. Thank you~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://software.sandia.gov/pipermail/trilinos-users/attachments/20130515/3afbdc93/attachment.html
More information about the Trilinos-Users
mailing list