[petsc-users] Problem Using EPSGetEigenpair

Eda Oktay eda.oktay at metu.edu.tr
Fri Feb 8 08:07:11 CST 2019


Dear Professor Roman,

Thank you for answering.

Eda

Jose E. Roman <jroman at dsic.upv.es>, 8 Şub 2019 Cum, 17:05 tarihinde şunu
yazdı:

> You are printing the variable as an integer, and it is not an integer,
> it's a PetscScalar. Use %g
> Jose
>
>
> > El 8 feb 2019, a las 15:02, Eda Oktay via petsc-users <
> petsc-users at mcs.anl.gov> escribió:
> >
> > Hello,
> >
> > I am trying to test EPSGetEigenpair function on ex11 in EPS.
> >
> > First, I executed ex11 and get 0.097887 as eigenvalue (k).
> >
> > Then under the code
> >
> > ierr = PetscPrintf(PETSC_COMM_WORLD," Number of requested eigenvalues:
> %D\n",nev);CHKERRQ(ierr);
> >
> > I added the following code:
> >
> >   ierr = EPSGetEigenpair(eps,0,&kr,NULL,NULL,NULL);
> >   ierr = PetscPrintf(PETSC_COMM_WORLD," Requested eigenvalue:
> %D\n",kr);CHKERRQ(ierr);
> >
> > After execution, I expected to find 0.097887 but the requested
> eigenvalue was found as -876957631.
> >
> > Why EPSGetEigenpair couldn't give 0.097887, isn't  0.097887 the
> eigenvalue that EPSSetWhichEigenpairs(eps,EPS_SMALLEST_REAL) calculated?
> >
> > Best regards,
> >
> > Eda
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190208/052e06ee/attachment.html>


More information about the petsc-users mailing list