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, Vec, void *), void *ctx)
Logically Collective
Input Parameters#
snes - the
SNEScontextfunc - function evaluation routine
ctx - [optional] user-defined context for private data for the function evaluation routine (may be
NULL)
Calling sequence of func#
PetscErrorCode func(SNES snes, Vec x, void *ctx);
snes - the
SNESsolverx - vector to put initial guess
ctx - optional user-defined function context
See Also#
SNES: Nonlinear Solvers, SNES, SNESSolve(), SNESGetFunction(), SNESComputeFunction(), SNESSetJacobian()
Level#
intermediate
Location#
Examples#
src/snes/tutorials/ex18.c
src/snes/tutorials/ex48.c
src/snes/tutorials/ex58.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages