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

# KSPSetComputeInitialGuess

set routine to compute the initial guess of the linear system

### Synopsis

    #include "petscksp.h"
    PetscErrorCode KSPSetComputeInitialGuess(KSP ksp,PetscErrorCode (*func)(KSP,Vec,void*),void *ctx)

Logically Collective Many br

### Input Arguments

| ksp | - the KSP context Many br
| func | - function to compute the initial guess Many br
| ctx | - optional context Many br

### Calling sequence of func

     func(KSP ksp,Vec x,void *ctx)

| ksp | - the KSP context Many br
| x | - solution vector Many br
| ctx | - optional user-provided context Many br

Many br

### See Also

KSPSolve(), KSPSetComputeRHS(), KSPSetComputeOperators(), DMKSPSetComputeInitialGuess()

Level:beginner
Location:src/ksp/ksp/interface/itfunc.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ksp/ksp/examples/tutorials/ex45.c.html
src/ksp/ksp/examples/tutorials/ex45f.F.html