petsc-3.7.1 2016-05-15
Report Typos and Errors

# SNESSetComputeInitialGuess

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

### Synopsis

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

Logically Collective on SNES Many br

### Input Parameters

| snes | - the SNES context Many br
| func | - function evaluation routine Many br
| ctx | - [optional] user-defined context for private data for the Many brfunction evaluation routine (may be NULL) Many br

### Calling sequence of func

       func (SNES snes,Vec x,void *ctx);

f -function vector Many br
ctx -optional user-defined function context Many br

Many br

### Keywords

SNES, nonlinear, set, function

### See Also

SNESGetFunction(), SNESComputeFunction(), SNESSetJacobian()

Level:intermediate
Location:src/snes/interface/snes.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/snes/examples/tutorials/ex7.c.html
src/snes/examples/tutorials/ex18.c.html
src/snes/examples/tutorials/ex20.c.html
src/snes/examples/tutorials/ex48.c.html
src/snes/examples/tutorials/ex58.c.html