petsc-3.9.0 2018-04-07
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
DMAdaptorCreate SNESCreate SNESSetJacobian
DMAdaptorDestroy SNESDestroy SNESSetSolution
DMAdaptorSetFromOptions SNESFASType SNESSolve
DMAdaptorSetUp SNESGetKSP SNESType
DMAdaptorView SNESGetLineSearch SNESVINEWTONRSLS
DMDASNESSetFunctionLocal SNESKSPONLY SNESVINEWTONSSLS
DMDASNESSetJacobianLocal SNESLineSearch SNESView
DMDASNESSetObjectiveLocal SNESLineSearchType SNES_CONERGED_ITERATING
DMDASNESSetPicardLocal SNESMS SNES_CONVERGED_FNORM_ABS
DMSNESSetFunctionLocal SNESMSSetType SNES_CONVERGED_FNORM_RELATIVE
DMSNESSetJacobianLocal SNESNCG SNES_CONVERGED_SNORM_RELATIVE
PetscConvEstCreate SNESNEWTONLS SNES_DIVERGED_DTOL
PetscConvEstDestroy SNESNGMRES SNES_DIVERGED_FNORM_NAN
PetscConvEstSetFromOptions SNESNRICHARDSON SNES_DIVERGED_FUNCTION_COUNT
PetscConvEstSetUp SNESQN SNES_DIVERGED_LINE_SEARCH
PetscConvEstView SNESQNSetType SNES_DIVERGED_LOCAL_MIN
SNES SNESReasonView SNES_DIVERGED_MAX_IT
SNESANDERSON SNESSetFromOptions
SNESConvergedReason SNESSetFunction
Intermediate - Setting options for algorithms and data structures
DMAdaptorAdapt SNESLineSearchBTGetAlpha SNESNASMSetDamping
DMAdaptorGetSequenceLength SNESLineSearchBTSetAlpha SNESNASMSetSubdomains
DMAdaptorGetSolver SNESLineSearchComputeNorms SNESNASMSetType
DMAdaptorSetSequenceLength SNESLineSearchDestroy SNESNASMSetWeight
DMAdaptorSetSolver SNESLineSearchGetDefaultMonitor SNESNCGSetType
DMSNESSetBoundaryLocal SNESLineSearchGetOrder SNESNEWTONTR
KSPMonitorSNES SNESLineSearchGetPostCheck SNESNGMRESSetRestartFmRise
KSPMonitorSNESLGResidualNormCreate SNESLineSearchGetPreCheck SNESNGMRESSetRestartType
KSPMonitorSNESLGResidualNormDestroy SNESLineSearchGetReason SNESNGMRESSetSelectType
PetscConvEstGetConvRate SNESLineSearchGetTolerances SNESNGSFunction
PetscConvEstGetSolver SNESLineSearchMonitorCancel SNESNGSGetSweeps
PetscConvEstSetSolver SNESLineSearchMonitorSet SNESNGSGetTolerances
SNESASPIN SNESLineSearchMonitorSolutionUpdate SNESNGSSetSweeps
SNESCOMPOSITE SNESLineSearchReason SNESNGSSetTolerances
SNESComputeJacobianDefault SNESLineSearchSetComputeNorms SNESPythonSetType
SNESComputeJacobianDefaultColor SNESLineSearchSetDamping SNESQNSetRestartType
SNESConvergedDefault SNESLineSearchSetDefaultMonitor SNESQNSetScaleType
SNESConvergenceTestFunction SNESLineSearchSetFromOptions SNESReasonViewFromOptions
SNESFunction SNESLineSearchSetOrder SNESReset
SNESGetApplicationContext SNESLineSearchSetPostCheck SNESSetApplicationContext
SNESGetConvergedReason SNESLineSearchSetPreCheck SNESSetComputeApplicationContext
SNESGetConvergenceHistory SNESLineSearchSetTolerances SNESSetComputeInitialGuess
SNESGetDM SNESLineSearchSetType SNESSetConvergedReason
SNESGetDivergenceTolerance SNESLineSearchView SNESSetConvergenceHistory
SNESGetErrorIfNotConverged SNESLoad SNESSetDM
SNESGetGridSequence SNESMSType SNESSetDivergenceTolerance
SNESGetIterationNumber SNESMonitorCancel SNESSetErrorIfNotConverged
SNESGetLagJacobian SNESMonitorDefault SNESSetForceIteration
SNESGetLagPreconditioner SNESMonitorDefaultField SNESSetGridSequence
SNESGetLinearSolveFailures SNESMonitorFields SNESSetLagJacobian
SNESGetLinearSolveIterations SNESMonitorRange SNESSetLagPreconditioner
SNESGetMaxLinearSolveFailures SNESMonitorRatio SNESSetMaxLinearSolveFailures
SNESGetMaxNonlinearStepFailures SNESMonitorRatioSetUp SNESSetMaxNonlinearStepFailures
SNESGetNPCSide SNESMonitorResidual SNESSetNGS
SNESGetNonlinearStepFailures SNESMonitorScaling SNESSetNPCSide
SNESGetNumberFunctionEvals SNESMonitorSet SNESSetObjective
SNESGetRhs SNESMonitorSolution SNESSetPicard
SNESGetSolution SNESMonitorSolutionUpdate SNESSetTolerances
SNESGetTolerances SNESNASMGetDamping SNESSetTrustRegionTolerance
SNESGetType SNESNASMGetNumber SNESSetType
SNESGetUseMatrixFree SNESNASMGetSNES SNESSetUseMatrixFree
SNESJacobianFunction SNESNASMGetSubdomains
SNESLineSearchApply SNESNASMGetType
Advanced - Setting more advanced options and customization
DMSNESGetFunction SNESKSPGetParametersEW SNESMatrixFreeCreate2
DMSNESGetJacobian SNESKSPGetUseEW SNESMonitorFunction
DMSNESGetNGS SNESKSPSetParametersEW SNESMonitorSAWs
DMSNESGetObjective SNESKSPSetUseEW SNESNASM
DMSNESGetPicard SNESLINESEARCHBASIC SNESNGS
DMSNESSetFunction SNESLINESEARCHBT SNESNormSchedule
DMSNESSetJacobian SNESLINESEARCHCP SNESObjectiveComputeFunctionDefaultFD
DMSNESSetNGS SNESLINESEARCHL2 SNESObjectiveFunction
DMSNESSetObjective SNESLINESEARCHNLEQERR SNESRegister
DMSNESSetPicard SNESLINESEARCHSHELL SNESRegisterAll
MatCreateSNESMF SNESLineSearchAppendOptionsPrefix SNESSHELL
MatSNESMFGetReuseBase SNESLineSearchGetDamping SNESSetAlwaysComputesFinalResidual
MatSNESMFSetReuseBase SNESLineSearchGetLambda SNESSetConvergenceTest
SNESAppendOptionsPrefix SNESLineSearchGetOptionsPrefix SNESSetFunctionDomainError
SNESComputeObjective SNESLineSearchGetVecs SNESSetOptionsPrefix
SNESConvergedSkip SNESLineSearchPostCheckFunction SNESSetUp
SNESDefaultMatrixFreeSetParameters2 SNESLineSearchPreCheckFunction SNESSetUpdate
SNESFunctionType SNESLineSearchPreCheckPicard SNESShellGetContext
SNESGetAlwaysComputesFinalResidual SNESLineSearchRegister SNESShellSetContext
SNESGetFunction SNESLineSearchRegisterAll SNESShellSetSolve
SNESGetFunctionDomainError SNESLineSearchSetLambda SNESVISetComputeVariableBounds
SNESGetFunctionType SNESLineSearchSetNorms SNESVISetVariableBounds
SNESGetJacobian SNESLineSearchSetUp SNES_NORM_ALWAYS
SNESGetNGS SNESLineSearchSetVecs SNES_NORM_FINAL_ONLY
SNESGetNormSchedule SNESLineSearchShellGetUserFunc SNES_NORM_INITIAL_FINAL_ONLY
SNESGetObjective SNESLineSearchShellSetUserFunc SNES_NORM_INITIAL_ONLY
SNESGetOptionsPrefix SNESMSRegister SNES_NORM_NONE
SNESGetPicard SNESMSRegisterAll
SNESGetSolutionUpdate SNESMSRegisterDestroy
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
DMCopyDMSNES SNESCompositeGetSNES SNESLineSearchSetVIFunctions
DMGetDMSNES SNESCompositeSetDamping SNESLineSearchSetWorkVecs
DMGetDMSNESWrite SNESCompositeSetType SNESMSFinalizePackage
DMPlexGetCellFields SNESComputeFunction SNESMSInitializePackage
DMPlexGetFaceFields SNESComputeJacobian SNESMonitor
DMPlexGetFaceGeometry SNESComputeNGS SNESMonitorSAWsCreate
DMPlexRestoreCellFields SNESFinalizePackage SNESMonitorSAWsDestroy
DMPlexRestoreFaceFields SNESGetFunctionNorm SNESMonitorSetFromOptions
DMPlexRestoreFaceGeometry SNESGetNPC SNESNASMGetSubdomainVecs
DMPlexSNESComputeBoundaryFEM SNESGetNPCFunction SNESNASMSetComputeFinalJacobian
DMPlexSNESComputeJacobianActionFEM SNESHasNPC SNESSetCountersReset
DMPlexSNESComputeJacobianFEM SNESInitializePackage SNESSetFunctionNorm
DMPlexSNESComputeResidualFEM SNESLineSearchCreate SNESSetFunctionType
DMPlexSNESGetGeometryFEM SNESLineSearchGetNorms SNESSetInitialFunction
DMPlexSNESGetGeometryFVM SNESLineSearchGetSNES SNESSetIterationNumber
DMPlexSNESGetGradientDM SNESLineSearchGetVIFunctions SNESSetKSP
DMPlexSetSNESLocalFEM SNESLineSearchMonitor SNESSetLagJacobianPersists
DMSNESCopy SNESLineSearchMonitorSetFromOptions SNESSetLagPreconditionerPersists
MatMFFDComputeJacobian SNESLineSearchPostCheck SNESSetLineSearch
PetscConvEstRateView SNESLineSearchPreCheck SNESSetNPC
SNESAddOptionsChecker SNESLineSearchReset SNESSetNormSchedule
SNESApplyNPC SNESLineSearchSetFunction SNESSetUpMatrices
SNESCompositeAddSNES SNESLineSearchSetReason SNESSetWorkVecs
SNESCompositeGetNumber SNESLineSearchSetSNES
No deprecated routines
None: Not yet cataloged
MatSNESMFGetSNES SNESGetForceIteration

Table of Contents