[petsc-users] SLEPc mantain eigenvalue/eigenvector ordering compatible with problem matrix

Alessio Cardillo alessio.cardillo at ct.infn.it
Wed Jul 11 06:05:12 CDT 2012


Hello to all,

I am using SLEPc library to solve an eigenvalue problem using the lapack solver.

the solver works fine (both eigenvalue and eigenvectors are correct)
but the order in which solutions are given is different from the
original one.

My problem is:

I need to retrieve the pair (eigenvalue + eigenvector) with the same
order as the original problem matrix OR I need to get the problem
matrix in the same order as the solution pairs.

For the sake of clarity, below I report an example of what I mean:

Cheers,

Alessio



COEFFICIENT MATRIX:

1  0  0
0  2  0
0  0  3

##### EXPECTED SOLUTION ######

1.000 0.000 0.000
0.000 1.000 0.000
0.000 0.000 1.000

with eigenvalues

1.000   2.000  3.000

###### REAL SOLUTION ######

EIGENVECTOR MATRIX (row ordered)

0.000 0.000 1.000
0.000 1.000 0.000
1.000 0.000 0.000

EIGENVALUES

3.000
2.000
1.000


-- 
--------------------------------------------------------------------------------------------------------------------
Alessio Cardillo - PhD student in Physics

Department of Condensed Matter Physics,
University of Zaragoza
and
Institute for Biocomputation and Physics of Complex Systems (BIFI)
University of Zaragoza

Facultad de Ciencias, Universidad de Zaragoza,
C/Pedro Cerbuna 12, 50009, Zaragoza, Spain

Phone: +34 976 76 2455

Web  : http://bifi.es/~cardillo/
Web 2: http://www.ct.infn.it/atp/
---------------------------------------------------------------------------------------------------------------------


More information about the petsc-users mailing list