Nonlinear solvers - SNES: Examples

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() ).

Beginner - Basic usage
SNES SNESProblemType SNESSetJacobian
SNESConvergedReason SNESSetFromOptions SNESSetMinimizationFunction
SNESCreate SNESSetFunction SNESSolve
SNESDestroy SNESSetGradient SNESType
SNESGetSLES SNESSetHessian SNESView
Intermediate - Setting options for algorithms and data structures
DMMGSetSNESLocal SNESGetApplicationContext SNESSetApplicationContext
SNESClearMonitor SNESGetConvergedReason SNESSetConvergenceHistory
SNESConverged_EQ_LS SNESGetConvergenceHistory SNESSetLineSearchParams
SNESConverged_EQ_TR SNESGetFunctionNorm SNESSetMinimizationFunctionTolerance
SNESConverged_UM_LS SNESGetGradientNorm SNESSetMonitor
SNESConverged_UM_TR SNESGetIterationNumber SNESSetRatioMonitor
SNESDAComputeJacobianWithAdic SNESGetLineSearchParams SNESSetTolerances
SNESDAFormFunction SNESGetNumberLinearIterations SNESSetTrustRegionTolerance
SNESDefaultComputeHessian SNESGetNumberUnsuccessfulSteps SNESSetType
SNESDefaultComputeHessianColor SNESGetProblemType SNESVecViewMonitor
SNESDefaultComputeJacobian SNESGetTolerances SNESVecViewUpdateMonitor
SNESDefaultComputeJacobianColor SNESGetType
SNESDefaultMonitor SNESRatioMonitor
Advanced - Setting more advanced options and customization
DMMGSetInitialGuess SNESGetOptionsPrefix SNESSetConvergenceTest
DMMGSetSNES SNESGetSolution SNESSetLineSearch
SNESAppendOptionsPrefix SNESGetSolutionUpdate SNESSetLineSearchCheck
SNESCubicLineSearch SNESNoLineSearch SNESSetOptionsPrefix
SNESGetFunction SNESNoLineSearchNoNorms SNESSetUp
SNESGetGradient SNESQuadraticLineSearch SNES_KSP_SetConvergenceTestEW
SNESGetHessian SNESRegisterAll SNES_KSP_SetParametersEW
SNESGetJacobian SNESRegisterDestroy
SNESGetMinimizationFunction SNESRegisterDynamic
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
SNESComputeFunction SNESComputeHessian SNESComputeMinimizationFunction
SNESComputeGradient SNESComputeJacobian

Table of Contents