SNESSetComputeInitialGuess#

Sets a routine used to compute an initial guess for the nonlinear problem

Synopsis#

#include "petscsnes.h"  
PetscErrorCode SNESSetComputeInitialGuess(SNES snes, PetscErrorCode (*func)(SNES snes, Vec x, void *ctx), void *ctx)

Logically Collective

Input Parameters#

  • snes - the SNES context

  • func - function evaluation routine

  • ctx - [optional] user-defined context for private data for the function evaluation routine (may be NULL)

Calling sequence of func#

  • snes - the SNES solver

  • x - vector to put initial guess

  • ctx - optional user-defined function context

See Also#

SNES: Nonlinear Solvers, SNES, SNESSolve(), SNESSetFunction(), SNESGetFunction(), SNESComputeFunction(), SNESSetJacobian()

Level#

intermediate

Location#

src/snes/interface/snes.c

Examples#

src/snes/tutorials/ex48.c
src/snes/tutorials/ex18.c
src/snes/tutorials/ex58.c


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