KSPGMRESSetOrthogonalization

Sets the orthogonalization routine used by GMRES and FGMRES.

Synopsis

#include "petscksp.h"  
int KSPGMRESSetOrthogonalization(KSP ksp,int (*fcn)(KSP,int))
Collective on KSP

Input Parameters

ksp - iterative context obtained from KSPCreate
fcn - orthogonalization function

Calling Sequence of function

  errorcode = int fcn(KSP ksp,int it);
  it is one minus the number of GMRES iterations since last restart;
   i.e. the size of Krylov space minus one

Notes

Several orthogonalization routines are predefined, including

KSPGMRESModifiedGramSchmidtOrthogonalization()

KSPGMRESUnmodifiedGramSchmidtOrthogonalization() - NOT recommended; however, for some problems, particularly when using parallel distributed vectors, this may be significantly faster. Default.

KSPGMRESIROrthogonalization() - iterative refinement version of KSPGMRESUnmodifiedGramSchmidtOrthogonalization(), which may be more numerically stable.

Options Database Keys

-ksp_gmres_unmodifiedgramschmidt - Activates KSPGMRESUnmodifiedGramSchmidtOrthogonalization() (default)
-ksp_gmres_modifiedgramschmidt - Activates KSPGMRESModifiedGramSchmidtOrthogonalization()
-ksp_gmres_irorthog - Activates KSPGMRESIROrthogonalization()

Keywords

KSP, GMRES, set, orthogonalization, Gram-Schmidt, iterative refinement

See Also

KSPGMRESSetRestart(), KSPGMRESSetPreallocateVectors()

Level:intermediate
Location:
src/sles/ksp/impls/gmres/gmres2.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages