petsc-3.4.5 2014-06-29

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

Table of Contents