[petsc-users] reg: Eigenvectors of general complex eigen value problem
Jose E. Roman
jroman at dsic.upv.es
Mon Mar 24 04:51:52 CDT 2014
El 24/03/2014, a las 10:28, venkatesh g escribió:
> Ok. I am doing the following
>
> 1. Running "./ex7 -f1 A2 -f2 B2 -st_type sinvert -evecs VC"
> 2. In MATLAB I do "vc=PetscBinaryRead('VC');"
>
> The output is one Eigenvector in VC which is 800x1.
>
> And I did the normalization vc=vc/max(vc) and compared with the normalized original vector.. Also I must tell that if A2 and B2 are real, it works.
>
> I also changed the line 179 of ex7.c like u said.
>
> Pls let me know.
>
You should do
vc=PetscBinaryRead('VC','complex',true);
If you want to load several eigenvectors, then
vc=PetscBinaryRead('VC','complex',true,'cell',nconv);
where nconv is the number of converged eigenpairs reported by SLEPc. In that case, the result is a cell array so vc{1} is the first eigenvector, vc{2} the second one, and so on.
Jose
More information about the petsc-users
mailing list