petsc-dev 2014-07-30
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 SNESFASType SNESSetFromOptions
SNESAnderson SNESGetKSP SNESSetFunction
SNES_CONERGED_ITERATING SNESGetLineSearch SNESSetJacobian
SNES_CONVERGED_FNORM_ABS SNES SNESSetObjective
SNES_CONVERGED_FNORM_RELATIVE SNESKSPONLY SNESSolve
SNESConvergedReason SNESLineSearch 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 SNESLineSearchDestroy SNESNCGSetType
SNESCOMPOSITE SNESLineSearchGetMonitor SNESNEWTONTR
SNESComputeJacobianDefaultColor SNESLineSearchGetOrder SNESNGMRESSetRestartType
SNESComputeJacobianDefault SNESLineSearchGetPostCheck SNESNGMRESSetSelectType
SNESConvergedDefault SNESLineSearchGetSuccess SNESNGSFunction
SNESConvergenceTestFunction SNESLineSearchGetTolerances SNESNGSGetSweeps
SNESFASGetType SNESLineSearchSetComputeNorms SNESNGSGetTolerances
SNESFASSetLevels SNESLineSearchSetDamping SNESNGSSetSweeps
SNESFASSetType SNESLineSearchSetFromOptions SNESNGSSetTolerances
SNESFunction SNESLineSearchSetMonitor SNESPythonSetType
SNESGetApplicationContext SNESLineSearchSetOrder SNESQNSetRestartType
SNESGetConvergedReason SNESLineSearchSetPostCheck SNESQNSetScaleType
SNESGetConvergenceHistory SNESLineSearchSetPreCheck SNESReset
SNESGetDM SNESLineSearchSetTolerances SNESSetApplicationContext
SNESGetErrorIfNotConverged SNESLineSearchSetType SNESSetComputeApplicationContext
SNESGetIterationNumber SNESLineSearchView SNESSetComputeInitialGuess
SNESGetLagJacobian SNESLoad SNESSetConvergenceHistory
SNESGetLagPreconditioner SNESMonitorCancel SNESSetDM
SNESGetLinearSolveFailures SNESMonitorDefault SNESSetErrorIfNotConverged
SNESGetLinearSolveIterations SNESMonitorFields SNESSetGridSequence
SNESGetMaxLinearSolveFailures SNESMonitorRange SNESSetLagJacobian
SNESGetMaxNonlinearStepFailures SNESMonitorRatio SNESSetLagPreconditioner
SNESGetNonlinearStepFailures SNESMonitorResidual SNESSetMaxLinearSolveFailures
SNESGetNPCSide SNESMonitorSet SNESSetMaxNonlinearStepFailures
SNESGetNumberFunctionEvals SNESMonitorSetRatio SNESSetNGS
SNESGetRhs SNESMonitorSolution SNESSetNPCSide
SNESGetSolution SNESMonitorSolutionUpdate SNESSetPicard
SNESGetTolerances SNESMSType SNESSetTolerances
SNESGetType SNESNASMGetDamping SNESSetTrustRegionTolerance
SNESJacobianFunction SNESNASMGetSubdomains SNESSetType
SNESLineSearchApply SNESNASMGetType SNESTEST
SNESLineSearchBTGetAlpha SNESNASMSetDamping SNESUpdateCheckJacobian
SNESLineSearchBTSetAlpha SNESNASMSetSubdomains
SNESLineSearchComputeNorms SNESNASMSetType
Advanced - Setting more advanced options and customization
DMSNESGetFunction SNESFASSetInterpolation SNESLineSearchSetLambda
DMSNESGetJacobian SNESFASSetLog SNESLineSearchSetNorms
DMSNESGetNGS SNESFASSetMonitor SNESLineSearchSetUp
DMSNESGetObjective SNESFASSetNumberSmoothDown SNESLineSearchSetVecs
DMSNESGetPicard SNESFASSetNumberSmoothUp SNESLineSearchShellGetUserFunc
DMSNESSetFunction SNESFASSetRestriction SNESLINESEARCHSHELL
DMSNESSetJacobian SNESFASSetRScale SNESLineSearchShellSetUserFunc
DMSNESSetNGS SNESFunctionType SNESMatrixFreeCreate2
DMSNESSetObjective SNESGetFunctionDomainError SNESMonitorFunction
DMSNESSetPicard SNESGetFunction SNESMonitorSAWs
MatCreateSNESMF SNESGetFunctionType SNESMSRegisterAll
SNESAppendOptionsPrefix SNESGetJacobian SNESMSRegisterDestroy
SNESComputeObjective SNESGetNGS SNESMSRegister
SNESConvergedSkip SNESGetNormSchedule SNESNASM
SNESDefaultMatrixFreeSetParameters2 SNESGetObjective SNESNGS
SNESFASCycleGetCorrection SNESGetOptionsPrefix SNES_NORM_ALWAYS
SNESFASCycleGetSmootherDown SNESGetPicard SNES_NORM_FINAL_ONLY
SNESFASCycleGetSmoother SNESGetSolutionUpdate SNES_NORM_INITIAL_FINAL_ONLY
SNESFASCycleGetSmootherUp SNESKSPGetParametersEW SNES_NORM_INITIAL_ONLY
SNESFASCycleIsFine SNESKSPGetUseEW SNES_NORM_NONE
SNESFASCycleSetCycles SNESKSPSetParametersEW SNESNormSchedule
SNESFASFullSetDownSweep SNESKSPSetUseEW SNESObjectiveComputeFunctionDefaultFD
SNESFASGetCoarseSolve SNESLineSearchAppendOptionsPrefix SNESObjectiveFunction
SNESFASGetCycleSNES SNESLINESEARCHBASIC SNESRegisterAll
SNESFASGetGalerkin SNESLINESEARCHBT SNESRegister
SNESFASGetInjection SNESLINESEARCHCP SNESSetConvergenceTest
SNESFASGetInterpolation SNESLineSearchGetDamping SNESSetFunctionDomainError
SNESFASGetLevels SNESLineSearchGetLambda SNESSetOptionsPrefix
SNESFASGetRestriction SNESLineSearchGetOptionsPrefix SNESSetUpdate
SNESFASGetSmootherDown SNESLineSearchGetVecs SNESSetUp
SNESFASGetSmoother SNESLINESEARCHL2 SNESShellGetContext
SNESFASGetSmootherUp SNESLineSearchPostCheckFunction SNESSHELL
SNESFASSetContinuation SNESLineSearchPreCheckFunction SNESShellSetContext
SNESFASSetCycles SNESLineSearchPreCheckPicard SNESShellSetSolve
SNESFASSetGalerkin SNESLineSearchRegisterAll SNESVISetComputeVariableBounds
SNESFASSetInjection SNESLineSearchRegister SNESVISetVariableBounds
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
DMCopyDMSNES SNESFASRestrict SNESMonitorSAWsDestroy
DMGetDMSNES SNESFinalizePackage SNESMSFinalizePackage
DMGetDMSNESWrite SNESGetNPCFunction SNESMSInitializePackage
DMSNESCopy SNESGetNPC SNESNASMGetSubdomainVecs
MatMFFDComputeJacobian SNESInitializePackage SNESNASMSetComputeFinalJacobian
SNESAddOptionsChecker SNESLineSearchCreate SNESSetCountersReset
SNESApplyNPC SNESLineSearchGetNorms SNESSetFunctionType
SNESCompositeAddSNES SNESLineSearchGetSNES SNESSetInitialFunction
SNESCompositeGetSNES SNESLineSearchGetVIFunctions SNESSetIterationNumber
SNESCompositeSetDamping SNESLineSearchPostCheck SNESSetKSP
SNESCompositeSetType SNESLineSearchPreCheck SNESSetLagJacobianPersists
SNESComputeFunction SNESLineSearchReset SNESSetLagPreconditionerPersists
SNESComputeJacobian SNESLineSearchSetFunction SNESSetLineSearch
SNESComputeNGS SNESLineSearchSetSNES SNESSetNormSchedule
SNESFASCreateCoarseVec SNESLineSearchSetSuccess SNESSetNPC
SNESFASCycleGetInjection SNESLineSearchSetVIFunctions SNESSetUpMatrices
SNESFASCycleGetInterpolation SNESLineSearchSetWorkVecs SNESSetWorkVecs
SNESFASCycleGetRestriction SNESMonitor
SNESFASCycleGetRScale SNESMonitorSAWsCreate
No deprecated routines

Table of Contents