petsc-3.3-p7 2013-05-11

SNESSolve

Solves a nonlinear system F(x) = b. Call SNESSolve() after calling SNESCreate() and optional routines of the form SNESSetXXX().

Synopsis

#include "petscsnes.h"  
#include "petscdmshell.h" 
#include "petscsys.h" 
PetscErrorCode  SNESSolve(SNES snes,Vec b,Vec x)
Collective on SNES

Input Parameters

snes - the SNES context
b - the constant part of the equation F(x) = b, or PETSC_NULL to use zero.
x - the solution vector.

Notes

The user should initialize the vector,x, with the initial guess for the nonlinear solve prior to calling SNESSolve. In particular, to employ an initial guess of zero, the user should explicitly set this vector to zero by calling VecSet().

Keywords

SNES, nonlinear, solve

See Also

SNESCreate(), SNESDestroy(), SNESSetFunction(), SNESSetJacobian(), SNESSetGridSequence(), SNESGetSolution()

Level:beginner
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/ex1.c.html
src/snes/examples/tutorials/ex2.c.html
src/snes/examples/tutorials/ex3.c.html
src/snes/examples/tutorials/ex4.c.html
src/snes/examples/tutorials/ex5.c.html
src/snes/examples/tutorials/ex5s.c.html
src/snes/examples/tutorials/ex6.c.html
src/snes/examples/tutorials/ex7.c.html
src/snes/examples/tutorials/ex8.c.html
src/snes/examples/tutorials/ex10.c.html
src/snes/examples/tutorials/ex12.c.html