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

Table of Contents