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

Beginner - Basic usage
DMDASNESSetFunctionLocal SNES_DIVERGED_MAX_IT SNESNGMRES
DMDASNESSetJacobianLocal SNESFAS SNESNRICHARDSON
SNES_CONERGED_ITERATING SNESGetKSP SNESQN
SNES_CONVERGED_FNORM_ABS SNES SNESSetFromOptions
SNES_CONVERGED_FNORM_RELATIVE SNESKSPONLY SNESSetFunction
SNESConvergedReason SNESLineSearchCreate SNESSetJacobian
SNES_CONVERGED_SNORM_RELATIVE SNESLineSearch SNESSetPicard
SNESCreate SNESLineSearchPreCheck SNESSolve
SNESDestroy SNESLineSearchType SNESType
SNES_DIVERGED_FNORM_NAN SNESLS SNESView
SNES_DIVERGED_FUNCTION_COUNT SNESMS SNESVIRS
SNES_DIVERGED_LINE_SEARCH SNESMSSetType SNESVISS
SNES_DIVERGED_LOCAL_MIN SNESNCG
Intermediate - Setting options for algorithms and data structures
SNESDefaultComputeJacobianColor SNESLineSearchBTGetAlpha SNESMonitorSolutionUpdate
SNESDefaultComputeJacobian SNESLineSearchBTSetAlpha SNESMSType
SNESDefaultConverged SNESLineSearchComputeNorms SNESNCGSetType
SNESDefaultUpdate SNESLineSearchDestroy SNESNGMRESSetRestartType
SNESDMComputeFunction SNESLineSearchGetMonitor SNESNGMRESSetSelectType
SNESFASGetType SNESLineSearchGetOrder SNESPythonSetType
SNESFASSetLevels SNESLineSearchGetPostCheck SNESQNSetCompositionType
SNESFASSetType SNESLineSearchGetSuccess SNESQNSetRestartType
SNESGetApplicationContext SNESLineSearchGetTolerances SNESQNSetScaleType
SNESGetConvergedReason SNESLineSearchPostCheck SNESReset
SNESGetConvergenceHistory SNESLineSearchReset SNESSetApplicationContext
SNESGetDM SNESLineSearchSetComputeNorms SNESSetComputeApplicationContext
SNESGetErrorIfNotConverged SNESLineSearchSetDamping SNESSetComputeInitialGuess
SNESGetFunctionNorm SNESLineSearchSetFromOptions SNESSetConvergenceHistory
SNESGetGSSweeps SNESLineSearchSetMonitor SNESSetDM
SNESGetIterationNumber SNESLineSearchSetOrder SNESSetErrorIfNotConverged
SNESGetLagJacobian SNESLineSearchSetPostCheck SNESSetGridSequence
SNESGetLagPreconditioner SNESLineSearchSetPreCheck SNESSetGS
SNESGetLinearSolveFailures SNESLineSearchSetTolerances SNESSetGSSweeps
SNESGetLinearSolveIterations SNESLineSearchSetType SNESSetLagJacobian
SNESGetMaxLinearSolveFailures SNESLineSearchView SNESSetLagPreconditioner
SNESGetMaxNonlinearStepFailures SNESMonitorCancel SNESSetMaxLinearSolveFailures
SNESGetNonlinearStepFailures SNESMonitorDefault SNESSetMaxNonlinearStepFailures
SNESGetNumberFunctionEvals SNESMonitorRange SNESSetTolerances
SNESGetRhs SNESMonitorRatio SNESSetTrustRegionTolerance
SNESGetSolution SNESMonitorResidual SNESSetType
SNESGetTolerances SNESMonitorSet SNESTEST
SNESGetType SNESMonitorSetRatio SNESTR
SNESLineSearchApply SNESMonitorSolution
Advanced - Setting more advanced options and customization
DMSNESGetFunction SNESFASSetNumberSmoothDown SNESLineSearchSetVecs
DMSNESGetGS SNESFASSetNumberSmoothUp SNESLineSearchShellGetUserFunc
DMSNESGetJacobian SNESFASSetRestriction SNESLINESEARCHSHELL
DMSNESGetPicard SNESFASSetRScale SNESLineSearchShellSetUserFunc
DMSNESSetFunction SNESGetFunctionDomainError SNESMatrixFreeCreate2
DMSNESSetGS SNESGetFunction SNESMSRegisterAll
DMSNESSetJacobian SNESGetGS SNESMSRegisterDestroy
DMSNESSetPicard SNESGetJacobian SNESMSRegister
MatCreateSNESMF SNESGetNormType SNES_NORM_FINAL_ONLY
SNESAppendOptionsPrefix SNESGetOptionsPrefix SNES_NORM_FUNCTION
SNESDefaultMatrixFreeSetParameters2 SNESGetPicard SNES_NORM_INITIAL_FINAL_ONLY
SNESFASCycleGetCorrection SNESGetSolutionUpdate SNES_NORM_INITIAL_ONLY
SNESFASCycleGetSmootherDown SNESGS SNES_NORM_NONE
SNESFASCycleGetSmoother SNESKSPGetParametersEW SNESNormType
SNESFASCycleGetSmootherUp SNESKSPGetUseEW SNESRegisterAll
SNESFASCycleIsFine SNESKSPSetParametersEW SNESRegisterDestroy
SNESFASCycleSetCycles SNESKSPSetUseEW SNESRegisterDynamic
SNESFASGetCoarseSolve SNESLineSearchAppendOptionsPrefix SNESRegister
SNESFASGetCycleSNES SNESLINESEARCHBASIC SNESSetConvergenceTest
SNESFASGetGalerkin SNESLINESEARCHBT SNESSetFunctionDomainError
SNESFASGetInjection SNESLINESEARCHCP SNESSetOptionsPrefix
SNESFASGetInterpolation SNESLineSearchGetDamping SNESSetUpdate
SNESFASGetLevels SNESLineSearchGetLambda SNESSetUp
SNESFASGetRestriction SNESLineSearchGetOptionsPrefix SNESShellGetContext
SNESFASGetSmootherDown SNESLineSearchGetVecs SNESSHELL
SNESFASGetSmoother SNESLINESEARCHL2 SNESShellSetContext
SNESFASGetSmootherUp SNESLineSearchPreCheckPicard SNESShellSetSolve
SNESFASSetCycles SNESLineSearchRegisterAll SNESSkipConverged
SNESFASSetGalerkin SNESLineSearchRegister SNESVISetComputeVariableBounds
SNESFASSetInjection SNESLineSearchSetLambda SNESVISetVariableBounds
SNESFASSetInterpolation SNESLineSearchSetNorms
SNESFASSetMonitor SNESLineSearchSetUp
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
DMSNESCopyContext SNESFASCycleGetRScale SNESMonitor
DMSNESGetContext SNESFASRestrict SNESMSFinalizePackage
DMSNESGetContextWrite SNESFinalizePackage SNESMSInitializePackage
MatMFFDComputeJacobian SNESGetPC SNESSetFunctionNorm
SNESAddOptionsChecker SNESGetSNESLineSearch SNESSetInitialFunction
SNESComputeFunction SNESInitializePackage SNESSetInitialFunctionNorm
SNESComputeGS SNESLineSearchGetNorms SNESSetIterationNumber
SNESComputeJacobian SNESLineSearchGetSNES SNESSetKSP
SNESDefaultGetWork SNESLineSearchGetVIFunctions SNESSetNormType
SNESFASCreateCoarseVec SNESLineSearchGetWork SNESSetPC
SNESFASCycleGetInjection SNESLineSearchSetSNES SNESSetSNESLineSearch
SNESFASCycleGetInterpolation SNESLineSearchSetSuccess SNESSetUpMatrices
SNESFASCycleGetRestriction SNESLineSearchSetVIFunctions
No deprecated routines

Table of Contents