petsc-3.11.4 2019-09-28
Report Typos and Errors

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" 
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) -

Notes

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

Keywords

set, initial guess, nonzero

See Also

KSPGetInitialGuessNonzero(), KSPSetGuessType(), KSPGuessType, KSP

Level

beginner

Location

src/ksp/ksp/interface/itfunc.c

Examples

src/ksp/pc/examples/tutorials/ex1.c.html
src/ksp/pc/examples/tutorials/ex2.c.html
src/ksp/ksp/examples/tutorials/ex3.c.html
src/ksp/ksp/examples/tutorials/ex9.c.html
src/ksp/ksp/examples/tutorials/ex27.c.html
src/ksp/ksp/examples/tutorials/ex51.c.html
src/ksp/ksp/examples/tutorials/ex56.c.html
src/ksp/ksp/examples/tutorials/ex58.c.html
src/ksp/ksp/examples/tutorials/ex72.c.html
src/ksp/ksp/examples/tutorials/ex6f.F90.html
src/tao/pde_constrained/examples/tutorials/parabolic.c.html

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