petsc-master 2015-07-06
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 SNESLineSearchGetReason SNESNGSGetSweeps
SNESConvergedDefault SNESLineSearchGetTolerances SNESNGSGetTolerances
SNESConvergenceTestFunction SNESLineSearchReason SNESNGSSetSweeps
SNESFASGetType SNESLineSearchSetComputeNorms SNESNGSSetTolerances
SNESFASSetLevels SNESLineSearchSetDamping SNESPythonSetType
SNESFASSetType SNESLineSearchSetFromOptions SNESQNSetRestartType
SNESFunction SNESLineSearchSetMonitor SNESQNSetScaleType
SNESGetApplicationContext SNESLineSearchSetOrder SNESReasonViewFromOptions
SNESGetConvergedReason SNESLineSearchSetPostCheck SNESReset
SNESGetConvergenceHistory SNESLineSearchSetPreCheck SNESSetApplicationContext
SNESGetDM SNESLineSearchSetTolerances SNESSetComputeApplicationContext
SNESGetErrorIfNotConverged SNESLineSearchSetType SNESSetComputeInitialGuess
SNESGetGridSequence SNESLineSearchView SNESSetConvergenceHistory
SNESGetIterationNumber SNESLoad SNESSetDM
SNESGetLagJacobian SNESMonitorCancel SNESSetErrorIfNotConverged
SNESGetLagPreconditioner SNESMonitorDefaultField SNESSetGridSequence
SNESGetLinearSolveFailures SNESMonitorDefault SNESSetLagJacobian
SNESGetLinearSolveIterations SNESMonitorFields SNESSetLagPreconditioner
SNESGetMaxLinearSolveFailures SNESMonitorRange SNESSetMaxLinearSolveFailures
SNESGetMaxNonlinearStepFailures SNESMonitorRatio SNESSetMaxNonlinearStepFailures
SNESGetNonlinearStepFailures SNESMonitorResidual SNESSetNGS
SNESGetNPCSide SNESMonitorSet SNESSetNPCSide
SNESGetNumberFunctionEvals SNESMonitorSetRatio SNESSetObjective
SNESGetRhs SNESMonitorSolution SNESSetPicard
SNESGetSolution SNESMonitorSolutionUpdate SNESSetTolerances
SNESGetTolerances SNESMSType SNESSetTrustRegionTolerance
SNESGetType SNESNASMGetDamping SNESSetType
SNESJacobianFunction SNESNASMGetSubdomains SNESTEST
SNESLineSearchApply SNESNASMGetType SNESUpdateCheckJacobian
SNESLineSearchBTGetAlpha SNESNASMSetDamping
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 SNESLineSearchSetSNES
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 SNESLineSearchSetReason
No deprecated routines

Table of Contents