Skip to main content
`Ctrl`+`K`

# KSPGetInitialGuessNonzero

Determines whether the `KSP` solver is using a zero initial guess.

## Synopsis

    #include "petscksp.h"
    #include "petscmat.h"
    PetscErrorCode KSPGetInitialGuessNonzero(KSP ksp, PetscBool *flag)

Not Collective

## Input Parameter

- ksp - iterative solver obtained from `KSPCreate()`

## Output Parameter

- flag - `PETSC_TRUE` if guess is nonzero, else `PETSC_FALSE`

## See Also

KSP: Linear System Solvers, `KSPSetInitialGuessNonzero()`, `KSP`

## Level

intermediate

## Location

src/ksp/ksp/interface/itfunc.c

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