#include "petscksp.h" PetscErrorCode KSPPIPEFGMRESSetShift(KSP ksp,PetscScalar shift)A heuristic is to set this to be comparable to the largest eigenvalue of the preconditioned operator. This can be acheived with PETSc itself by using a few iterations of a Krylov method. See KSPComputeEigenvalues (and note the caveats there).
Logically Collective on ksp
|ksp||- the Krylov space context|
|shift||- the shift|