[Trilinos-Users] EIGENVECTORS OF A LARGE SPARSE NON-HERMITIAN MATRIX

Baker, Christopher Grover cgbaker at sandia.gov
Wed Jul 30 08:56:33 MDT 2008


Axel,

There are two things that should be addressed in the code example below. The first is that the variable evecs is a RefCountPtr to the multivector containing the eigenvectors, so that outputting it will only output information regarding the pointer. Typically, given a RCP<MV>, the way to print it is to use Anasazi's multivector traits mechanism, like so:
MultiVecTraits<MV>::MvPrint(*evecs);
or to use the native print capability of the underlying multivector. For an Epetra_MultiVector (as in BlockKrylovSchurEx.cpp), this is done via:
evecs->Print(std::cout)

The second issue is that for a non-symmetric eigenvalue problem, the eigenvectors in evecs are stored in a compressed form. This storage scheme exploits the redundancy in the eigenvectors (due to the occurance of eigenvectors in complex conjugate pairs) in order to reduce the storage requirements. Extracting a complex eigenvector requires using the index in sol.index to locate the real and imaginary components of the desired eigenvector in sol.Evecs. An example of how to do this is in the BlockKrylovSchurEx.cpp you used to build your test. Documentation on this storage scheme is located at
http://trilinos.sandia.gov/packages/docs/r8.0/packages/anasazi/doc/html/structAnasazi_1_1Eigensolution.html#o3

Cheers,
Chris

On Wed, Jul 30, 2008 at 06:32, Axel CABLE <axel.cable at etu.univ-nantes.fr> wrote:

    Dear list,

    I want to get the largest eigenvalue and corresponding eigenvector of a
    real large sparse non-symmetric matrix.

    I modified the Anasazi BlockKrylovSchurEx example, building my own matrix.

    The example does give the eigenvalues but I cant get it to give the
    eigenvectors:

    I figured

     Teuchos::RCP<MV> evecs = sol.Evecs;
     std::vector<int> index = sol.index;

    and cout << "Eigenvectors" << evecs <<endl;

    would be enough, but I am clearly missing something here.
    Would you have an idea how to get it to output the eigenvectors? (or at
    least the one associated with the largest eigenvalue)

    Thanks in advance!

    Axel





    _______________________________________________
    Trilinos-Users mailing list
    Trilinos-Users at software.sandia.gov
    http://software.sandia.gov/mailman/listinfo/trilinos-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20080730/634c8178/attachment.html 


More information about the Trilinos-Users mailing list