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

Table of Contents