KSPSetInitialGuessNonzero

Tells the iterative solver that the initial guess is nonzero; otherwise KSP assumes the initial guess is to be zero (and thus zeros it out before solving).

Synopsis

#include "petscksp.h" 
#include "petscmat.h" 
PetscErrorCode  KSPSetInitialGuessNonzero(KSP ksp,PetscBool flg)
Logically Collective on ksp

Input Parameters

ksp - iterative context obtained from KSPCreate()
flg - PETSC_TRUE indicates the guess is non-zero, PETSC_FALSE indicates the guess is zero

Options database keys

-ksp_initial_guess_nonzero : use nonzero initial guess; this takes an optional truth value (0/1/no/yes/true/false)

Level: beginner

Notes

If this is not called the X vector is zeroed in the call to KSPSolve().

See Also

KSPGetInitialGuessNonzero(), KSPSetGuessType(), KSPGuessType, KSP

Location:itfunc.c