PETSc version 3.15.5
Fix/Edit manual page

# KSPHPDDMSetType

Sets the type of Krylov method used in KSPHPDDM.

### Synopsis

    #include "petscksp.h"
    PetscErrorCode KSPHPDDMSetType(KSP ksp, KSPHPDDMType type)

### Input Parameters

| ksp | - iterative context
| type | - any of gmres, bgmres, cg, bcg, gcrodr, bgcrodr, bfbcg, or preonly

### Notes

Unlike KSPReset(), this function does not destroy any deflation space attached to the KSP. As an example, in the following sequence: KSPHPDDMSetType(ksp, KSPGCRODR); KSPSolve(ksp, b, x); KSPHPDDMSetType(ksp, KSPGMRES); KSPHPDDMSetType(ksp, KSPGCRODR); KSPSolve(ksp, b, x); the recycled space is reused in the second KSPSolve().

### See Also

KSPCreate(), KSPType (for list of available types), KSPHPDDMType, KSPHPDDMGetType()

### Level

intermediate

### Location

src/ksp/ksp/impls/hpddm/hpddm.cxx

### Implementations

KSPHPDDMSetType_HPDDM in src/ksp/ksp/impls/hpddm/hpddm.cxx
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages