<div dir="ltr"><div>Dear Professor Roman,</div><div><br></div>Thank you for answering.<div><br></div><div>Eda</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Jose E. Roman <<a href="mailto:jroman@dsic.upv.es">jroman@dsic.upv.es</a>>, 8 Şub 2019 Cum, 17:05 tarihinde şunu yazdı:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">You are printing the variable as an integer, and it is not an integer, it's a PetscScalar. Use %g<br>
Jose<br>
<br>
<br>
> El 8 feb 2019, a las 15:02, Eda Oktay via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" target="_blank">petsc-users@mcs.anl.gov</a>> escribió:<br>
> <br>
> Hello,<br>
> <br>
> I am trying to test EPSGetEigenpair function on ex11 in EPS. <br>
> <br>
> First, I executed ex11 and get 0.097887 as eigenvalue (k).<br>
> <br>
> Then under the code <br>
> <br>
> ierr = PetscPrintf(PETSC_COMM_WORLD," Number of requested eigenvalues: %D\n",nev);CHKERRQ(ierr);<br>
> <br>
> I added the following code:<br>
> <br>
> ierr = EPSGetEigenpair(eps,0,&kr,NULL,NULL,NULL); <br>
> ierr = PetscPrintf(PETSC_COMM_WORLD," Requested eigenvalue: %D\n",kr);CHKERRQ(ierr);<br>
> <br>
> After execution, I expected to find 0.097887 but the requested eigenvalue was found as -876957631.<br>
> <br>
> Why EPSGetEigenpair couldn't give 0.097887, isn't 0.097887 the eigenvalue that EPSSetWhichEigenpairs(eps,EPS_SMALLEST_REAL) calculated?<br>
> <br>
> Best regards,<br>
> <br>
> Eda<br>
<br>
</blockquote></div>