[petsc-users] EPSSolve finds eigensolutions in deflation space

Jose E. Roman jroman at dsic.upv.es
Mon May 9 10:06:51 CDT 2016


> El 8 may 2016, a las 18:47, Giacomo Mulas <giacomo.mulas84 at gmail.com> escribió:
> 
> On Sun, 8 May 2016, Jose E. Roman wrote:
> 
>> The custom function for stopping based on a user-defined criterion will be
>> available in slepc-3.7, to be released in a few days.  You can already try
>> this functionality in the master branch of the development repo.  Hope it
>> fits your needs.
> 
> That's great news, I'll definitely give it a try!  If I can use it for my
> needs, it would also sidestep the deflation space issue, since I only use it
> to exclude already found eigenstates in subsequent calls of EPSSolve till I
> get enough.  If I can get all the eigenstates I need, and (close to) no more
> than those I need, in one single EPSSolve call, I will not need to define
> the deflation space at all anymore.
> 
>> Regarding the deflation space issue, I will try your example and get back
>> to you soon.
> 
> thanks! Of course, if useful, I am more than willing to help with it. Let me
> know.
> 
> Bye
> Giacomo

The manpage of EPSSetDeflationSpace() says:

   These vectors do not persist from one EPSSolve() call to the other, so the
   deflation space should be set every time.

In your code, you almost always call EPSSetDeflationSpace() before EPSSolve(), except when the inner loop (line 238) is iterated more than once. Try placing the EPSSetDeflationSpace() call inside this loop.

Jose



More information about the petsc-users mailing list