[petsc-users] Delfated Krylov solver in PETSc

Qin Lu lu_qin_2000 at yahoo.com
Thu Feb 13 15:59:32 CST 2014


Jed,
 
Thanks a lot for the useful info!
 
Qin



On Thursday, February 13, 2014 3:29 PM, Jed Brown <jed at jedbrown.org> wrote:
  
Qin Lu <lu_qin_2000 at yahoo.com> writes:

> It seems there is a deflated GMRES solver in PETSc (KSPDGMRES), 

This uses approximate eigen-functions as deflation vectors.  There are
many other ways to choose deflation spaces.

> but PETSc manual does not give any details how to use it. 

Unfortunately, the person that contributed KSPDGMRES did not write man
pages or explain in the users manual.

> A doc I found online is "parallel implementation of the deflated GMRES
> in the PETSc package", which mentioned to set number of eigenvalues to
> deflate by --ksp_dgmres_eigen, etc. Can I set these parameters by
> function calls (rather than using .petscrc)?

The relevant functions are listed by -help.

$ ./ex2 -ksp_type dgmres -help | grep ksp_dgmres
  -ksp_dgmres_eigen <1>: Number of smallest eigenvalues to extract at each restart (KSPDGMRESSetEigen)
  -ksp_dgmres_max_eigen <9>: Maximum Number of smallest eigenvalues to extract  (KSPDGMRESSetMaxEigen)
  -ksp_dgmres_ratio <1>: Relaxation parameter for the smaller number of matrix-vectors product allowed (KSPDGMRESSetRatio)
  -ksp_dgmres_improve: <FALSE> Improve the computation of eigenvalues by solving a new generalized eigenvalue problem (experimental - not stable at this time) (None)
  -ksp_dgmres_force: <FALSE> Sets DGMRES always at restart active, i.e do not use the adaptive strategy (KSPDGMRESForce)


> Suppose the number of unknowns is 10,000, what would be the good
> number of number of eigenvalues to deflate? Or I may just use the
> default values (if they exist) for this solver?

There is no way to guess; just try it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140213/ab5ce8f9/attachment.html>


More information about the petsc-users mailing list