[petsc-users] algorithm to get pure real eigen valule for general eigenvalue problem(Non-hermitian type)

Zhang Wei zhang.wei at chalmers.se
Mon Apr 15 09:50:25 CDT 2013


Hi 
Since the case is not that big(size of matrix is 9600x9600. ). I have done test in the first way, which gives me a 2.1 Gb ASCII file. The eigen values I  get from matlab are :
> In eigs>processEUPDinfo at 1340
  In eigs at 357 
>> c

c =

        0          
        0          
        0          
        0          
   1.9405 - 0.4733i
   1.9405 + 0.4733i

And what I got from slepc are :

0       1.99988
1       1.99974 
2       1.99971 
3       1.99913+0.0370552j      
4       1.99913+-0.0370552j     
5       1.99894+0.0370115j      

Non of them is right one. And on the other hand there are lots of small values in the matrix which are almost in order of 1e-7 and even smaller.  
Could it  be the reason resulting such problem?
-----Original Message-----
From: petsc-users-bounces at mcs.anl.gov [mailto:petsc-users-bounces at mcs.anl.gov] On Behalf Of Jose E. Roman
Sent: den 15 april 2013 11:44
To: PETSc users list
Subject: Re: [petsc-users] algorithm to get pure real eigen valule for general eigenvalue problem(Non-hermitian type)


El 15/04/2013, a las 11:28, Zhang Wei escribió:

> Hi
> Sorry I forgot to say it is matrix free case. So if I can export matrix like that? Or any another way to do so? 
> 
> Yours Sincerely
> ------------------------
> Wei Zhang
> Ph.D
> Hydrodynamic Group
> Dept. of Shipping and Marine Technology Chalmers University of 
> Technology Sweden
> Phone:+46-31 772 2703

You could run the SLEPc program with "-eps_type lapack", then a dense matrix will be created using matrix-vector products (you will see it if you set the -mat_view_matlab flag). This is very rudimentary and only viable for very small dimension. A better alternative would be to call MatComputeExplicitOperator() from within your code, use a binary viewer to save the resulting matrix and load it in Matlab with PetscBinaryRead.m.

Jose



More information about the petsc-users mailing list