petsc-3.3-p7 2013-05-11
Nonlinear solvers - SNES: Examples
The Scalable Nonlinear Equations Solvers (SNES) component provides an
easy-to-use interface to Newton-type, quasi-Newton, full approximation scheme (FAS) multigrid, and other methods for solving systems of
nonlinear equations. SNES users can set various algorithmic options
at runtime via the options database (e.g., specifying a trust region
method via
-snes_type tr
).
SNES internally employs KSP for the solution of
its linear systems.
SNES users can also set KSP options directly in application
codes by first extracting the KSP context from the SNES context via
SNESGetKSP()
and then directly calling various KSP (and PC) routines (e.g.,
PCSetType()
).
ex1.c: Solves a nonlinear system on 1 processor with SNES
ex4.c: This program demonstrates use of the SNES package to solve systems of nonlinear equations on a single processor
ex5.c: Solves a nonlinear system in parallel with SNES
ex7.c: Solves u`` + u^{2} = f with Newton-like methods
ex8.c:
ex9.c: This program demonstrates use of the SNES package
ex10.c:
ex11.c: static char help[] =
ex13.c: This program is a replica of ex6
ex15.c:
ex16.c:
ex17.c: Newton's method to solve a two-variable system, sequentially
makefile