petsc-3.7.1 2016-05-15
Report Typos and Errors

# KSPFGMRESSetModifyPC

Sets the routine used by FGMRES to modify the preconditioner.

### Synopsis

    #include "petscksp.h"
    PetscErrorCode  KSPFGMRESSetModifyPC(KSP ksp,PetscErrorCode (*fcn)(KSP,PetscInt,PetscInt,PetscReal,void*),void *ctx,PetscErrorCode (*d)(void*))

Logically Collective on KSP Many br

### Input Parameters

| ksp | - iterative context obtained from KSPCreate Many br
| fcn | - modifypc function Many br
| ctx | - optional contex Many br
| d | - optional context destroy routine Many br

### Calling Sequence of function

ierr = int fcn(KSP ksp,int total_its,int loc_its,PetscReal res_norm,void*ctx); Many br

ksp - the ksp context being used. Many brtotal_its - the total number of FGMRES iterations that have occurred. Many brloc_its - the number of FGMRES iterations since last restart. Many brres_norm - the current residual norm. Many brctx - optional context variable Many br

### Options Database Keys

-ksp_fgmres_modifypcnochange Many br-ksp_fgmres_modifypcksp Many br

Many br

Contributed by Allison Baker Many br

### Notes

Several modifypc routines are predefined, including Many brKSPFGMRESModifyPCNoChange() Many brKSPFGMRESModifyPCKSP() Many br

### See Also

KSPFGMRESModifyPCNoChange(), KSPFGMRESModifyPCKSP()

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