Nonlinear solvers - SNES Manual Pages#
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 newtontr
).
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() ). Manual Pages Table of Contents
Manual Pages by Level#
Beginner - Basic usage#
Intermediate - Setting options for algorithms and data structures#
Advanced - Setting more advanced options and customization#
Developer - Interfaces intended primarily for library developers, not for typical applications programmers#
No deprecated routines#
Single list of manual pages#
- DMAdaptorAdapt
- DMAdaptorCreate
- DMAdaptorDestroy
- DMAdaptorGetSequenceLength
- DMAdaptorGetSolver
- DMAdaptorSetFromOptions
- DMAdaptorSetSequenceLength
- DMAdaptorSetSolver
- DMAdaptorSetUp
- DMAdaptorView
- DMCopyDMSNES
- DMDASNESSetFunctionLocal
- DMDASNESSetFunctionLocalVec
- DMDASNESSetJacobianLocal
- DMDASNESSetJacobianLocalVec
- DMDASNESSetObjectiveLocal
- DMDASNESSetPicardLocal
- DMGetDMSNES
- DMGetDMSNESWrite
- DMInterpolationAddPoints
- DMInterpolationCreate
- DMInterpolationDestroy
- DMInterpolationEvaluate
- DMInterpolationGetCoordinates
- DMInterpolationGetDim
- DMInterpolationGetDof
- DMInterpolationGetVector
- DMInterpolationRestoreVector
- DMInterpolationSetDim
- DMInterpolationSetDof
- DMInterpolationSetUp
- DMPlexSNESComputeBoundaryFEM
- DMPlexSNESComputeJacobianFEM
- DMPlexSNESComputeResidualFEM
- DMPlexSetSNESLocalFEM
- DMSNESCheckDiscretization
- DMSNESCheckFromOptions
- DMSNESCheckJacobian
- DMSNESCheckResidual
- DMSNESComputeJacobianAction
- DMSNESCopy
- DMSNESCreateJacobianMF
- DMSNESGetBoundaryLocal
- DMSNESGetFunction
- DMSNESGetFunctionLocal
- DMSNESGetJacobian
- DMSNESGetJacobianLocal
- DMSNESGetNGS
- DMSNESGetObjective
- DMSNESGetPicard
- DMSNESSetBoundaryLocal
- DMSNESSetFunction
- DMSNESSetFunctionContextDestroy
- DMSNESSetFunctionLocal
- DMSNESSetJacobian
- DMSNESSetJacobianContextDestroy
- DMSNESSetJacobianLocal
- DMSNESSetMFFunction
- DMSNESSetNGS
- DMSNESSetObjective
- DMSNESSetPicard
- DMSetVI
- KSPMonitorSNESResidual
- KSPMonitorSNESResidualDrawLG
- KSPMonitorSNESResidualDrawLGCreate
- MatCreateSNESMF
- MatCreateSNESMFMore
- MatMFFDComputeJacobian
- MatSNESMFGetReuseBase
- MatSNESMFGetSNES
- MatSNESMFMoreSetParameters
- MatSNESMFSetReuseBase
- PetscConvEst
- PetscConvEstCreate
- PetscConvEstDestroy
- PetscConvEstGetConvRate
- PetscConvEstGetSolver
- PetscConvEstMonitorDefault
- PetscConvEstRateView
- PetscConvEstSetFromOptions
- PetscConvEstSetSolver
- PetscConvEstSetUp
- PetscConvEstView
- SNES
- SNESANDERSON
- SNESASPIN
- SNESAddOptionsChecker
- SNESAppendOptionsPrefix
- SNESApplyNPC
- SNESCOMPOSITE
- SNESCompositeAddSNES
- SNESCompositeGetNumber
- SNESCompositeGetSNES
- SNESCompositeSetDamping
- SNESCompositeSetType
- SNESComputeFunction
- SNESComputeJacobian
- SNESComputeJacobianDefault
- SNESComputeJacobianDefaultColor
- SNESComputeMFFunction
- SNESComputeNGS
- SNESComputeObjective
- SNESConvergedCorrectPressure
- SNESConvergedDefault
- SNESConvergedReason
- SNESConvergedReasonView
- SNESConvergedReasonViewCancel
- SNESConvergedReasonViewFromOptions
- SNESConvergedReasonViewSet
- SNESConvergedSkip
- SNESConvergenceTestFunction
- SNESCreate
- SNESDestroy
- SNESFASType
- SNESFinalizePackage
- SNESFunction
- SNESFunctionType
- SNESGetAlwaysComputesFinalResidual
- SNESGetApplicationContext
- SNESGetCheckJacobianDomainError
- SNESGetConvergedReason
- SNESGetConvergedReasonString
- SNESGetConvergenceHistory
- SNESGetDM
- SNESGetDivergenceTolerance
- SNESGetErrorIfNotConverged
- SNESGetForceIteration
- SNESGetFunction
- SNESGetFunctionDomainError
- SNESGetFunctionNorm
- SNESGetFunctionType
- SNESGetGridSequence
- SNESGetIterationNumber
- SNESGetJacobian
- SNESGetJacobianDomainError
- SNESGetKSP
- SNESGetLagJacobian
- SNESGetLagPreconditioner
- SNESGetLineSearch
- SNESGetLinearSolveFailures
- SNESGetLinearSolveIterations
- SNESGetMaxLinearSolveFailures
- SNESGetMaxNonlinearStepFailures
- SNESGetNGS
- SNESGetNPC
- SNESGetNPCFunction
- SNESGetNPCSide
- SNESGetNonlinearStepFailures
- SNESGetNormSchedule
- SNESGetNumberFunctionEvals
- SNESGetObjective
- SNESGetOptionsPrefix
- SNESGetPicard
- SNESGetRhs
- SNESGetSolution
- SNESGetSolutionNorm
- SNESGetSolutionUpdate
- SNESGetTolerances
- SNESGetType
- SNESGetUpdateNorm
- SNESGetUseMatrixFree
- SNESHasNPC
- SNESInitializePackage
- SNESJacobianFunction
- SNESKSPGetParametersEW
- SNESKSPGetUseEW
- SNESKSPONLY
- SNESKSPSetParametersEW
- SNESKSPSetUseEW
- SNESKSPTRANSPOSEONLY
- SNESLINESEARCHBASIC
- SNESLINESEARCHBT
- SNESLINESEARCHCP
- SNESLINESEARCHL2
- SNESLINESEARCHNCGLINEAR
- SNESLINESEARCHNLEQERR
- SNESLINESEARCHSHELL
- SNESLineSearch
- SNESLineSearchAppendOptionsPrefix
- SNESLineSearchApply
- SNESLineSearchBTGetAlpha
- SNESLineSearchBTSetAlpha
- SNESLineSearchComputeNorms
- SNESLineSearchCreate
- SNESLineSearchDestroy
- SNESLineSearchGetDamping
- SNESLineSearchGetDefaultMonitor
- SNESLineSearchGetLambda
- SNESLineSearchGetNorms
- SNESLineSearchGetOptionsPrefix
- SNESLineSearchGetOrder
- SNESLineSearchGetPostCheck
- SNESLineSearchGetPreCheck
- SNESLineSearchGetReason
- SNESLineSearchGetSNES
- SNESLineSearchGetTolerances
- SNESLineSearchGetType
- SNESLineSearchGetVIFunctions
- SNESLineSearchGetVecs
- SNESLineSearchMonitor
- SNESLineSearchMonitorCancel
- SNESLineSearchMonitorSet
- SNESLineSearchMonitorSetFromOptions
- SNESLineSearchMonitorSolutionUpdate
- SNESLineSearchPostCheck
- SNESLineSearchPreCheck
- SNESLineSearchPreCheckPicard
- SNESLineSearchReason
- SNESLineSearchRegister
- SNESLineSearchRegisterAll
- SNESLineSearchReset
- SNESLineSearchSetComputeNorms
- SNESLineSearchSetDamping
- SNESLineSearchSetDefaultMonitor
- SNESLineSearchSetFromOptions
- SNESLineSearchSetFunction
- SNESLineSearchSetLambda
- SNESLineSearchSetNorms
- SNESLineSearchSetOrder
- SNESLineSearchSetPostCheck
- SNESLineSearchSetPreCheck
- SNESLineSearchSetReason
- SNESLineSearchSetSNES
- SNESLineSearchSetTolerances
- SNESLineSearchSetType
- SNESLineSearchSetUp
- SNESLineSearchSetVIFunctions
- SNESLineSearchSetVecs
- SNESLineSearchSetWorkVecs
- SNESLineSearchShellGetUserFunc
- SNESLineSearchShellSetUserFunc
- SNESLineSearchType
- SNESLineSearchView
- SNESLoad
- SNESMS
- SNESMSFinalizePackage
- SNESMSGetDamping
- SNESMSGetType
- SNESMSInitializePackage
- SNESMSRegister
- SNESMSRegisterAll
- SNESMSRegisterDestroy
- SNESMSSetDamping
- SNESMSSetType
- SNESMSType
- SNESMULTIBLOCK
- SNESMonitor
- SNESMonitorCancel
- SNESMonitorDefault
- SNESMonitorDefaultField
- SNESMonitorFields
- SNESMonitorFunction
- SNESMonitorJacUpdateSpectrum
- SNESMonitorRange
- SNESMonitorRatio
- SNESMonitorRatioSetUp
- SNESMonitorResidual
- SNESMonitorSAWs
- SNESMonitorSAWsCreate
- SNESMonitorSAWsDestroy
- SNESMonitorScaling
- SNESMonitorSet
- SNESMonitorSetFromOptions
- SNESMonitorSolution
- SNESMonitorSolutionUpdate
- SNESMultiblockGetSubSNES
- SNESMultiblockSetBlockSize
- SNESMultiblockSetFields
- SNESMultiblockSetIS
- SNESMultiblockSetType
- SNESNASM
- SNESNASMGetDamping
- SNESNASMGetNumber
- SNESNASMGetSNES
- SNESNASMGetSubdomainVecs
- SNESNASMGetSubdomains
- SNESNASMGetType
- SNESNASMSetComputeFinalJacobian
- SNESNASMSetDamping
- SNESNASMSetSubdomains
- SNESNASMSetType
- SNESNASMSetWeight
- SNESNCG
- SNESNCGSetType
- SNESNEWTONLS
- SNESNEWTONTR
- SNESNEWTONTRDC
- SNESNGMRES
- SNESNGMRESSetRestartFmRise
- SNESNGMRESSetRestartType
- SNESNGMRESSetSelectType
- SNESNGS
- SNESNGSFunction
- SNESNGSGetSweeps
- SNESNGSGetTolerances
- SNESNGSSetSweeps
- SNESNGSSetTolerances
- SNESNRICHARDSON
- SNESNewtonTRDCGetPostCheck
- SNESNewtonTRDCGetPreCheck
- SNESNewtonTRDCGetRhoFlag
- SNESNewtonTRDCPostCheck
- SNESNewtonTRDCPreCheck
- SNESNewtonTRDCSetPostCheck
- SNESNewtonTRDCSetPreCheck
- SNESNewtonTRGetPostCheck
- SNESNewtonTRGetPreCheck
- SNESNewtonTRPostCheck
- SNESNewtonTRPreCheck
- SNESNewtonTRSetPostCheck
- SNESNewtonTRSetPreCheck
- SNESNormSchedule
- SNESObjectiveComputeFunctionDefaultFD
- SNESObjectiveFunction
- SNESPATCH
- SNESPythonGetType
- SNESPythonSetType
- SNESQN
- SNESQNSetRestartType
- SNESQNSetScaleType
- SNESQNSetType
- SNESRegister
- SNESRegisterAll
- SNESReset
- SNESResetFromOptions
- SNESSHELL
- SNESSetAlwaysComputesFinalResidual
- SNESSetApplicationContext
- SNESSetCheckJacobianDomainError
- SNESSetComputeApplicationContext
- SNESSetComputeInitialGuess
- SNESSetConvergedReason
- SNESSetConvergenceHistory
- SNESSetConvergenceTest
- SNESSetCountersReset
- SNESSetDM
- SNESSetDivergenceTolerance
- SNESSetErrorIfNotConverged
- SNESSetForceIteration
- SNESSetFromOptions
- SNESSetFunction
- SNESSetFunctionDomainError
- SNESSetFunctionNorm
- SNESSetFunctionType
- SNESSetGridSequence
- SNESSetInitialFunction
- SNESSetIterationNumber
- SNESSetJacobian
- SNESSetJacobianDomainError
- SNESSetKSP
- SNESSetLagJacobian
- SNESSetLagJacobianPersists
- SNESSetLagPreconditioner
- SNESSetLagPreconditionerPersists
- SNESSetLineSearch
- SNESSetMaxLinearSolveFailures
- SNESSetMaxNonlinearStepFailures
- SNESSetNGS
- SNESSetNPC
- SNESSetNPCSide
- SNESSetNormSchedule
- SNESSetObjective
- SNESSetOptionsPrefix
- SNESSetPicard
- SNESSetSolution
- SNESSetTolerances
- SNESSetTrustRegionTolerance
- SNESSetType
- SNESSetUp
- SNESSetUpMatrices
- SNESSetUpdate
- SNESSetUseMatrixFree
- SNESSetWorkVecs
- SNESShellGetContext
- SNESShellSetContext
- SNESShellSetSolve
- SNESSolve
- SNESType
- SNESVIComputeFunction
- SNESVIComputeMeritFunction
- SNESVIGetInactiveSet
- SNESVINEWTONRSLS
- SNESVINEWTONSSLS
- SNESVISetComputeVariableBounds
- SNESVISetRedundancyCheck
- SNESVISetVariableBounds
- SNESView
- SNESViewFromOptions
- SNES_CONERGED_ITERATING
- SNES_CONVERGED_FNORM_ABS
- SNES_CONVERGED_FNORM_RELATIVE
- SNES_CONVERGED_SNORM_RELATIVE
- SNES_DIVERGED_DTOL
- SNES_DIVERGED_FNORM_NAN
- SNES_DIVERGED_FUNCTION_COUNT
- SNES_DIVERGED_LINE_SEARCH
- SNES_DIVERGED_LOCAL_MIN
- SNES_DIVERGED_MAX_IT
- SNES_NORM_ALWAYS
- SNES_NORM_FINAL_ONLY
- SNES_NORM_INITIAL_FINAL_ONLY
- SNES_NORM_INITIAL_ONLY
- SNES_NORM_NONE