petsc-3.5.0 2014-06-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 SNESKSPONLY SNESSolve
DMDASNESSetJacobianLocal SNESLineSearch SNESType
DMDASNESSetObjectiveLocal SNESLineSearchType SNESVINEWTONRSLS
DMDASNESSetPicardLocal SNESMS SNESVINEWTONSSLS
DMSNESSetFunctionLocal SNESMSSetType SNESView
DMSNESSetJacobianLocal SNESNCG SNES_CONERGED_ITERATING
SNES SNESNEWTONLS SNES_CONVERGED_FNORM_ABS
SNESAnderson SNESNGMRES SNES_CONVERGED_FNORM_RELATIVE
SNESConvergedReason SNESNRICHARDSON SNES_CONVERGED_SNORM_RELATIVE
SNESCreate SNESQN SNES_DIVERGED_FNORM_NAN
SNESDestroy SNESQNSetType SNES_DIVERGED_FUNCTION_COUNT
SNESFAS SNESSetFromOptions SNES_DIVERGED_LINE_SEARCH
SNESFASType SNESSetFunction SNES_DIVERGED_LOCAL_MIN
SNESGetKSP SNESSetJacobian SNES_DIVERGED_MAX_IT
SNESGetLineSearch SNESSetObjective
Intermediate - Setting options for algorithms and data structures
SNESASPIN SNESLineSearchDestroy SNESNCGSetType
SNESCOMPOSITE SNESLineSearchGetMonitor SNESNEWTONTR
SNESComputeJacobianDefault SNESLineSearchGetOrder SNESNGMRESSetRestartType
SNESComputeJacobianDefaultColor 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 SNESMSType SNESSetDM
SNESGetLinearSolveFailures SNESMonitorCancel SNESSetErrorIfNotConverged
SNESGetLinearSolveIterations SNESMonitorDefault SNESSetGridSequence
SNESGetMaxLinearSolveFailures SNESMonitorFields SNESSetLagJacobian
SNESGetMaxNonlinearStepFailures SNESMonitorRange SNESSetLagPreconditioner
SNESGetNPCSide SNESMonitorRatio SNESSetMaxLinearSolveFailures
SNESGetNonlinearStepFailures SNESMonitorResidual SNESSetMaxNonlinearStepFailures
SNESGetNumberFunctionEvals SNESMonitorSet SNESSetNGS
SNESGetRhs SNESMonitorSetRatio SNESSetNPCSide
SNESGetSolution SNESMonitorSolution SNESSetPicard
SNESGetTolerances SNESMonitorSolutionUpdate 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 SNESLineSearchRegisterAll
DMSNESGetJacobian SNESFASSetLog SNESLineSearchSetLambda
DMSNESGetNGS SNESFASSetMonitor SNESLineSearchSetNorms
DMSNESGetObjective SNESFASSetNumberSmoothDown SNESLineSearchSetUp
DMSNESGetPicard SNESFASSetNumberSmoothUp SNESLineSearchSetVecs
DMSNESSetFunction SNESFASSetRScale SNESLineSearchShellGetUserFunc
DMSNESSetJacobian SNESFASSetRestriction SNESLineSearchShellSetUserFunc
DMSNESSetNGS SNESFunctionType SNESMSRegister
DMSNESSetObjective SNESGetFunction SNESMSRegisterAll
DMSNESSetPicard SNESGetFunctionDomainError SNESMSRegisterDestroy
MatCreateSNESMF SNESGetFunctionType SNESMatrixFreeCreate2
SNESAppendOptionsPrefix SNESGetJacobian SNESMonitorFunction
SNESComputeObjective SNESGetNGS SNESMonitorSAWs
SNESConvergedSkip SNESGetNormSchedule SNESNASM
SNESDefaultMatrixFreeSetParameters2 SNESGetObjective SNESNGS
SNESFASCycleGetCorrection SNESGetOptionsPrefix SNESNormSchedule
SNESFASCycleGetSmoother SNESGetPicard SNESObjectiveComputeFunctionDefaultFD
SNESFASCycleGetSmootherDown SNESGetSolutionUpdate SNESObjectiveFunction
SNESFASCycleGetSmootherUp SNESKSPGetParametersEW SNESRegister
SNESFASCycleIsFine SNESKSPGetUseEW SNESRegisterAll
SNESFASCycleSetCycles SNESKSPSetParametersEW SNESSHELL
SNESFASFullSetDownSweep SNESKSPSetUseEW SNESSetConvergenceTest
SNESFASGetCoarseSolve SNESLINESEARCHBASIC SNESSetFunctionDomainError
SNESFASGetCycleSNES SNESLINESEARCHBT SNESSetOptionsPrefix
SNESFASGetGalerkin SNESLINESEARCHCP SNESSetUp
SNESFASGetInjection SNESLINESEARCHL2 SNESSetUpdate
SNESFASGetInterpolation SNESLINESEARCHSHELL SNESShellGetContext
SNESFASGetLevels SNESLineSearchAppendOptionsPrefix SNESShellSetContext
SNESFASGetRestriction SNESLineSearchGetDamping SNESShellSetSolve
SNESFASGetSmoother SNESLineSearchGetLambda SNESVISetComputeVariableBounds
SNESFASGetSmootherDown SNESLineSearchGetOptionsPrefix SNESVISetVariableBounds
SNESFASGetSmootherUp SNESLineSearchGetVecs SNES_NORM_ALWAYS
SNESFASSetContinuation SNESLineSearchPostCheckFunction SNES_NORM_FINAL_ONLY
SNESFASSetCycles SNESLineSearchPreCheckFunction SNES_NORM_INITIAL_FINAL_ONLY
SNESFASSetGalerkin SNESLineSearchPreCheckPicard SNES_NORM_INITIAL_ONLY
SNESFASSetInjection SNESLineSearchRegister SNES_NORM_NONE
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
DMCopyDMSNES SNESFASRestrict SNESMonitor
DMGetDMSNES SNESFinalizePackage SNESMonitorSAWsCreate
DMGetDMSNESWrite SNESGetNPC SNESMonitorSAWsDestroy
DMSNESCopy SNESGetNPCFunction 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 SNESSetNPC
SNESFASCreateCoarseVec SNESLineSearchSetSuccess SNESSetNormSchedule
SNESFASCycleGetInjection SNESLineSearchSetVIFunctions SNESSetUpMatrices
SNESFASCycleGetInterpolation SNESLineSearchSetWorkVecs SNESSetWorkVecs
SNESFASCycleGetRScale SNESMSFinalizePackage
SNESFASCycleGetRestriction SNESMSInitializePackage
No deprecated routines

Table of Contents