KSPComputeInitialGuessFn — PETSc 3.25.2 documentation

Skip to main content
`Ctrl`+`K`

# KSPComputeInitialGuessFn

A prototype of a `KSP` evaluation function that would be passed to `KSPSetComputeInitialGuess()`

## Synopsis

    PETSC_EXTERN_TYPEDEF typedef PetscErrorCode KSPComputeInitialGuessFn(KSP ksp, Vec x, PetscCtx ctx);

## Calling Sequence

- ksp - `ksp` context

- x - output vector

- ctx - [optional] user-defined function context

## See Also

KSP: Linear System Solvers, `KSP`, `KSPSetComputeInitialGuess()`, `SNESGetFunction()`, `KSPComputeRHSFn`, `KSPComputeOperatorsFn`

## Level

beginner

## Location

include/petscksp.h

Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages