petsc-dev 2014-02-02
Report Typos and Errors

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_FUNCTION_COUNT SNESNEWTONLS
DMDASNESSetJacobianLocal SNES_DIVERGED_LINE_SEARCH SNESNGMRES
DMDASNESSetObjectiveLocal SNES_DIVERGED_LOCAL_MIN SNESNRICHARDSON
DMDASNESSetPicardLocal SNES_DIVERGED_MAX_IT SNESQN
DMSNESSetFunctionLocal SNESFAS SNESQNSetType
DMSNESSetJacobianLocal SNESGetKSP SNESSetFromOptions
SNESAnderson SNES SNESSetFunction
SNES_CONERGED_ITERATING SNESKSPONLY SNESSetJacobian
SNES_CONVERGED_FNORM_ABS SNESLineSearchCreate SNESSetObjective
SNES_CONVERGED_FNORM_RELATIVE SNESLineSearch SNESSolve
SNESConvergedReason SNESLineSearchPreCheck SNESType
SNES_CONVERGED_SNORM_RELATIVE SNESLineSearchType SNESView
SNESCreate SNESMS SNESVINEWTONRSLS
SNESDestroy SNESMSSetType SNESVINEWTONSSLS
SNES_DIVERGED_FNORM_NAN SNESNCG
Intermediate - Setting options for algorithms and data structures
SNESASPIN SNESGSSetTolerances SNESMSType
SNESCOMPOSITE SNESJacobianFunction SNESNASMGetDamping
SNESComputeJacobianDefaultColor SNESLineSearchApply SNESNASMGetSubdomains
SNESComputeJacobianDefault SNESLineSearchBTGetAlpha SNESNASMSetDamping
SNESConvergedDefault SNESLineSearchBTSetAlpha SNESNASMSetSubdomains
SNESConvergenceTestFunction SNESLineSearchComputeNorms SNESNCGSetType
SNESFASGetType SNESLineSearchDestroy SNESNEWTONTR
SNESFASSetLevels SNESLineSearchGetMonitor SNESNGMRESSetRestartType
SNESFASSetType SNESLineSearchGetOrder SNESNGMRESSetSelectType
SNESFunction SNESLineSearchGetPostCheck SNESPythonSetType
SNESGetApplicationContext SNESLineSearchGetSuccess SNESQNSetRestartType
SNESGetConvergedReason SNESLineSearchGetTolerances SNESQNSetScaleType
SNESGetConvergenceHistory SNESLineSearchPostCheck SNESReset
SNESGetDM SNESLineSearchReset SNESSetApplicationContext
SNESGetErrorIfNotConverged SNESLineSearchSetComputeNorms SNESSetComputeApplicationContext
SNESGetFunctionNorm SNESLineSearchSetDamping SNESSetComputeInitialGuess
SNESGetIterationNumber SNESLineSearchSetFromOptions SNESSetConvergenceHistory
SNESGetLagJacobian SNESLineSearchSetMonitor SNESSetDM
SNESGetLagPreconditioner SNESLineSearchSetOrder SNESSetErrorIfNotConverged
SNESGetLinearSolveFailures SNESLineSearchSetPostCheck SNESSetGridSequence
SNESGetLinearSolveIterations SNESLineSearchSetPreCheck SNESSetGS
SNESGetMaxLinearSolveFailures SNESLineSearchSetTolerances SNESSetLagJacobian
SNESGetMaxNonlinearStepFailures SNESLineSearchSetType SNESSetLagPreconditioner
SNESGetNonlinearStepFailures SNESLineSearchView SNESSetMaxLinearSolveFailures
SNESGetNumberFunctionEvals SNESLoad SNESSetMaxNonlinearStepFailures
SNESGetPCSide SNESMonitorCancel SNESSetPCSide
SNESGetRhs SNESMonitorDefault SNESSetPicard
SNESGetSolution SNESMonitorRange SNESSetTolerances
SNESGetTolerances SNESMonitorRatio SNESSetTrustRegionTolerance
SNESGetType SNESMonitorResidual SNESSetType
SNESGSFunction SNESMonitorSet SNESTEST
SNESGSGetSweeps SNESMonitorSetRatio SNESUpdateCheckJacobian
SNESGSGetTolerances SNESMonitorSolution
SNESGSSetSweeps SNESMonitorSolutionUpdate
Advanced - Setting more advanced options and customization
DMSNESGetFunction SNESFASSetLog SNESLineSearchSetLambda
DMSNESGetGS SNESFASSetMonitor SNESLineSearchSetNorms
DMSNESGetJacobian SNESFASSetNumberSmoothDown SNESLineSearchSetUp
DMSNESGetObjective SNESFASSetNumberSmoothUp SNESLineSearchSetVecs
DMSNESGetPicard SNESFASSetRestriction SNESLineSearchShellGetUserFunc
DMSNESSetFunction SNESFASSetRScale SNESLINESEARCHSHELL
DMSNESSetGS SNESFunctionType SNESLineSearchShellSetUserFunc
DMSNESSetJacobian SNESGetFunctionDomainError SNESMatrixFreeCreate2
DMSNESSetObjective SNESGetFunction SNESMonitorFunction
DMSNESSetPicard SNESGetFunctionType SNESMonitorSAWs
MatCreateSNESMF SNESGetGS SNESMSRegisterAll
SNESAppendOptionsPrefix SNESGetJacobian SNESMSRegisterDestroy
SNESComputeObjective SNESGetNormSchedule SNESMSRegister
SNESConvergedSkip SNESGetObjective SNESNASM
SNESDefaultMatrixFreeSetParameters2 SNESGetOptionsPrefix SNES_NORM_ALWAYS
SNESFASCycleGetCorrection SNESGetPicard SNES_NORM_FINAL_ONLY
SNESFASCycleGetSmootherDown SNESGetSolutionUpdate SNES_NORM_INITIAL_FINAL_ONLY
SNESFASCycleGetSmoother SNESGS SNES_NORM_INITIAL_ONLY
SNESFASCycleGetSmootherUp SNESKSPGetParametersEW SNES_NORM_NONE
SNESFASCycleIsFine SNESKSPGetUseEW SNESNormSchedule
SNESFASCycleSetCycles SNESKSPSetParametersEW SNESObjectiveComputeFunctionDefaultFD
SNESFASFullSetDownSweep SNESKSPSetUseEW SNESObjectiveFunction
SNESFASGetCoarseSolve SNESLineSearchAppendOptionsPrefix SNESRegisterAll
SNESFASGetCycleSNES SNESLINESEARCHBASIC SNESRegister
SNESFASGetGalerkin SNESLINESEARCHBT SNESSetConvergenceTest
SNESFASGetInjection SNESLINESEARCHCP SNESSetFunctionDomainError
SNESFASGetInterpolation SNESLineSearchGetDamping SNESSetOptionsPrefix
SNESFASGetLevels SNESLineSearchGetLambda SNESSetUpdate
SNESFASGetRestriction SNESLineSearchGetOptionsPrefix SNESSetUp
SNESFASGetSmootherDown SNESLineSearchGetVecs SNESShellGetContext
SNESFASGetSmoother SNESLINESEARCHL2 SNESSHELL
SNESFASGetSmootherUp SNESLineSearchPostheckFunction SNESShellSetContext
SNESFASSetCycles SNESLineSearchPreCheckFunction SNESShellSetSolve
SNESFASSetGalerkin SNESLineSearchPreCheckPicard SNESVISetComputeVariableBounds
SNESFASSetInjection SNESLineSearchRegisterAll SNESVISetVariableBounds
SNESFASSetInterpolation SNESLineSearchRegister
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
DMCopyDMSNES SNESFASCycleGetRScale SNESMSInitializePackage
DMGetDMSNES SNESFASRestrict SNESNASMGetSubdomainVecs
DMGetDMSNESWrite SNESFinalizePackage SNESNASMSetComputeFinalJacobian
DMSNESCopy SNESGetLineSearch SNESSetCountersReset
MatMFFDComputeJacobian SNESGetPCFunction SNESSetFunctionNorm
SNESAddOptionsChecker SNESGetPC SNESSetFunctionType
SNESApplyPC SNESInitializePackage SNESSetInitialFunction
SNESCompositeAddSNES SNESLineSearchGetNorms SNESSetIterationNumber
SNESCompositeGetSNES SNESLineSearchGetSNES SNESSetKSP
SNESCompositeSetDamping SNESLineSearchGetVIFunctions SNESSetLagJacobianPersists
SNESCompositeSetType SNESLineSearchSetSNES SNESSetLagPreconditionerPersists
SNESComputeFunction SNESLineSearchSetSuccess SNESSetLineSearch
SNESComputeGS SNESLineSearchSetVIFunctions SNESSetNormSchedule
SNESComputeJacobian SNESLineSearchSetWorkVecs SNESSetPC
SNESFASCreateCoarseVec SNESMonitor SNESSetUpMatrices
SNESFASCycleGetInjection SNESMonitorSAWsCreate SNESSetWorkVecs
SNESFASCycleGetInterpolation SNESMonitorSAWsDestroy
SNESFASCycleGetRestriction SNESMSFinalizePackage
No deprecated routines

Table of Contents