[petsc-users] about the new EPSSetStoppingTestFunction functionality in SLEPC

Giacomo Mulas gmulas at oa-cagliari.inaf.it
Wed Jun 1 10:14:44 CDT 2016


On Wed, 1 Jun 2016, Jose E. Roman wrote:

> This functionality is currently very basic, not intended for doing
> sophisticated computations.  Currently there is no public API for
> accessing eigenvectors during EPSSolve.  Adding this would require a
> non-trivial effort.

Well, the currently converged eigenvectors (I need only the vectors, not the
eigenvalues) _must_ be somewhere, in some format in the eps structure.  Of
course I would need to only read them without modifying anything.  And
actually not even all of them, only some components.  Could you tell me if
there is some part of the code I can read to understand where they are
stored, so I can try to read them even without high-level interfaces?

Alternatively, a sort of inelegant but effective way of doing this would be
to
1) make a complete copy, a snapshot, of the EPS structure, store it via the
private ctx variable of MyStoppingTest every time a new eigenpair is found, 
and have MyStoppingTest return EPS_CONVERGED_USER
2) outside EPSSolve, do the actual convergence check, using all usual fancy
EPSGetConverged and EPSGetEigenvector calls, which are then available 
3) if more eigenpairs are needed, restore eps from the snapshot, so EPSSolve
does not have to start from scratch every time, and have it resume from
where it was.
To achieve this, I would need to know what I need to copy to "snapshot" an
eps structure, and how to resume a partial EPSSolve calculation from where
it was interrupted.

Would either solution (read converged eigenvectors directly off memory from
the eps structure or snapshot/resume EPSSolve) be viable without much effort
on your part (except telling me where to look in the code and possibly
answering some additional question if there's something I can't figure out)?

thanks in advance
Giacomo

-- 
_________________________________________________________________

Giacomo Mulas <gmulas at oa-cagliari.inaf.it>
_________________________________________________________________

INAF - Osservatorio Astronomico di Cagliari
via della scienza 5 - 09047 Selargius (CA)

tel.   +39 070 71180244
mob. : +39 329  6603810
_________________________________________________________________

"When the storms are raging around you, stay right where you are"
                          (Freddy Mercury)
_________________________________________________________________


More information about the petsc-users mailing list