<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Greg:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">OK, the difference is whether LU or Cholesky factorization is used. But I would hope that neither one should give incorrect eigenvalues, and when I run with the latter it does!</div></blockquote><div>Are your matrices symmetric/Hermitian?</div><div>Hong</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 21, 2017 at 2:05 PM Hong <<a href="mailto:hzhang@mcs.anl.gov" target="_blank">hzhang@mcs.anl.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">Gregory :</div><div class="gmail_quote">Use '-eps_view' for both runs to check the algorithms being used. </div><div class="gmail_quote">Hong</div><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I'm using shift-invert with EPS to solve for eigenvalues. I find that if I do only</div><div><br></div><div><font face="monospace">...</font></div><div><font face="monospace"> ierr = EPSGetST(eps,&st);CHKERRQ(<wbr>ierr);</font></div><div><font face="monospace"> ierr = STSetType(st,STSINVERT);<wbr>CHKERRQ(ierr);</font></div><div><font face="monospace">...</font></div><div><font face="monospace"><br></font></div><div>in my code I get correct eigenvalues. But if I do </div><div><font face="monospace"><br></font></div><div><font face="monospace">...</font></div><div><div style="font-family:monospace"> ierr = EPSGetST(eps,&st);CHKERRQ(<wbr>ierr);</div><div style="font-family:monospace"> ierr = STSetType(st,STSINVERT);<wbr>CHKERRQ(ierr);</div><div style="font-family:monospace"> ierr = STGetKSP(st,&ksp);CHKERRQ(<wbr>ierr);</div><div style="font-family:monospace"> ierr = KSPGetPC(ksp,&pc);CHKERRQ(<wbr>ierr);</div><div style="font-family:monospace"> ierr = KSPSetType(ksp,KSPPREONLY);<wbr>CHKERRQ(ierr);</div><div style="font-family:monospace"> ierr = PCSetType(pc,PCCHOLESKY);<wbr>CHKERRQ(ierr);</div><div style="font-family:monospace">...</div><div><br></div><div>the eigenvalues found by EPS are completely wrong! Somehow I thought I was supposed to do the latter, from the examples etc, but I guess that was not correct? I attach the full piece of test code and a test matrix.</div><div><br></div><div>Best,</div><div>Greg</div></div></div>
</blockquote></div><br></div></div>
</blockquote></div>
</div></div></blockquote></div><br></div></div>