[petsc-users] Delfated Krylov solver in PETSc

Jed Brown jed at jedbrown.org
Thu Feb 13 15:29:40 CST 2014

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 --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140213/212675ab/attachment.pgp>

More information about the petsc-users mailing list