The Scalable Nonlinear Equations Solvers (SNES) component provides an
easy-to-use interface to Newton-based 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 SLES for the solution of
its linear systems.
SNES users can also set SLES options directly in application
codes by first extracting the SLES context from the SNES context via
SNESGetSLES()
and then directly calling various SLES (and KSP and PC) routines (e.g.,
PCSetType()
).