petsc-3.3-p6 2013-02-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 SNESLineSearchType SNESVIRS
DMDASNESSetJacobianLocal SNESMS SNESVISS
SNES SNESMSSetType SNESView
SNESConvergedReason SNESNCG SNES_CONERGED_ITERATING
SNESCreate SNESNGMRES SNES_CONVERGED_FNORM_ABS
SNESDestroy SNESNRICHARDSON SNES_CONVERGED_FNORM_RELATIVE
SNESFAS SNESQN SNES_CONVERGED_SNORM_RELATIVE
SNESGetKSP SNESSetFromOptions SNES_DIVERGED_FNORM_NAN
SNESKSPONLY SNESSetFunction SNES_DIVERGED_FUNCTION_COUNT
SNESLS SNESSetJacobian SNES_DIVERGED_LINE_SEARCH
SNESLineSearch SNESSetPicard SNES_DIVERGED_LOCAL_MIN
SNESLineSearchCreate SNESSolve SNES_DIVERGED_MAX_IT
SNESLineSearchPreCheck SNESType
Intermediate - Setting options for algorithms and data structures
SNESDMComputeFunction SNESLineSearchBTGetAlpha SNESMonitorSolution
SNESDefaultComputeJacobian SNESLineSearchBTSetAlpha SNESMonitorSolutionUpdate
SNESDefaultComputeJacobianColor SNESLineSearchComputeNorms SNESNCGSetType
SNESDefaultConverged SNESLineSearchDestroy SNESNGMRESSetRestartType
SNESDefaultUpdate 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 SNESSetGS
SNESGetLagPreconditioner SNESLineSearchSetPreCheck SNESSetGSSweeps
SNESGetLinearSolveFailures SNESLineSearchSetTolerances SNESSetGridSequence
SNESGetLinearSolveIterations SNESLineSearchSetType SNESSetLagJacobian
SNESGetMaxLinearSolveFailures SNESLineSearchView SNESSetLagPreconditioner
SNESGetMaxNonlinearStepFailures SNESMSType SNESSetMaxLinearSolveFailures
SNESGetNonlinearStepFailures SNESMonitorCancel SNESSetMaxNonlinearStepFailures
SNESGetNumberFunctionEvals SNESMonitorDefault SNESSetTolerances
SNESGetRhs SNESMonitorRange SNESSetTrustRegionTolerance
SNESGetSolution SNESMonitorRatio SNESSetType
SNESGetTolerances SNESMonitorResidual SNESTEST
SNESGetType SNESMonitorSet SNESTR
SNESLineSearchApply SNESMonitorSetRatio
Advanced - Setting more advanced options and customization
DMSNESGetFunction SNESFASSetNumberSmoothDown SNESLineSearchSetUp
DMSNESGetGS SNESFASSetNumberSmoothUp SNESLineSearchSetVecs
DMSNESGetJacobian SNESFASSetRScale SNESLineSearchShellGetUserFunc
DMSNESGetPicard SNESFASSetRestriction SNESLineSearchShellSetUserFunc
DMSNESSetFunction SNESGS SNESMSRegister
DMSNESSetGS SNESGetFunction SNESMSRegisterAll
DMSNESSetJacobian SNESGetFunctionDomainError SNESMSRegisterDestroy
DMSNESSetPicard SNESGetGS SNESMatrixFreeCreate2
MatCreateSNESMF SNESGetJacobian SNESNormType
SNESAppendOptionsPrefix SNESGetNormType SNESRegister
SNESDefaultMatrixFreeSetParameters2 SNESGetOptionsPrefix SNESRegisterAll
SNESFASCycleGetCorrection SNESGetPicard SNESRegisterDestroy
SNESFASCycleGetSmoother SNESGetSolutionUpdate SNESRegisterDynamic
SNESFASCycleGetSmootherDown SNESKSPGetParametersEW SNESSHELL
SNESFASCycleGetSmootherUp SNESKSPGetUseEW SNESSetConvergenceTest
SNESFASCycleIsFine SNESKSPSetParametersEW SNESSetFunctionDomainError
SNESFASCycleSetCycles SNESKSPSetUseEW SNESSetOptionsPrefix
SNESFASGetCoarseSolve SNESLINESEARCHBASIC SNESSetUp
SNESFASGetCycleSNES SNESLINESEARCHBT SNESSetUpdate
SNESFASGetGalerkin SNESLINESEARCHCP SNESShellGetContext
SNESFASGetInjection SNESLINESEARCHL2 SNESShellSetContext
SNESFASGetInterpolation SNESLINESEARCHSHELL SNESShellSetSolve
SNESFASGetLevels SNESLineSearchAppendOptionsPrefix SNESSkipConverged
SNESFASGetRestriction SNESLineSearchGetDamping SNESVISetComputeVariableBounds
SNESFASGetSmoother SNESLineSearchGetLambda SNESVISetVariableBounds
SNESFASGetSmootherDown SNESLineSearchGetOptionsPrefix SNES_NORM_FINAL_ONLY
SNESFASGetSmootherUp SNESLineSearchGetVecs SNES_NORM_FUNCTION
SNESFASSetCycles SNESLineSearchPreCheckPicard SNES_NORM_INITIAL_FINAL_ONLY
SNESFASSetGalerkin SNESLineSearchRegister SNES_NORM_INITIAL_ONLY
SNESFASSetInjection SNESLineSearchRegisterAll SNES_NORM_NONE
SNESFASSetInterpolation SNESLineSearchSetLambda
SNESFASSetMonitor SNESLineSearchSetNorms
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
DMSNESCopyContext SNESFASCycleGetRestriction SNESMSFinalizePackage
DMSNESGetContext SNESFASRestrict SNESMSInitializePackage
DMSNESGetContextWrite SNESFinalizePackage SNESMonitor
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
SNESFASCycleGetRScale SNESLineSearchSetVIFunctions
No deprecated routines

Table of Contents