petsc-master 2020-07-09
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 SNES SNESReasonView
DMAdaptorDestroy SNESANDERSON SNESResetFromOptions
DMAdaptorSetFromOptions SNESConvergedReason SNESSetFromOptions
DMAdaptorSetUp SNESCreate SNESSetFunction
DMAdaptorView SNESDestroy SNESSetJacobian
DMDASNESSetFunctionLocal SNESFASType SNESSetSolution
DMDASNESSetJacobianLocal SNESGetKSP SNESSolve
DMDASNESSetObjectiveLocal SNESGetLineSearch SNESType
DMDASNESSetPicardLocal SNESKSPONLY SNESVINEWTONRSLS
DMInterpolationCreate SNESKSPTRANSPOSEONLY SNESVINEWTONSSLS
DMInterpolationDestroy SNESLineSearch SNESView
DMInterpolationEvaluate SNESLineSearchType SNES_CONERGED_ITERATING
DMSNESGetFunctionLocal SNESMS SNES_CONVERGED_FNORM_ABS
DMSNESGetJacobianLocal SNESMSGetType SNES_CONVERGED_FNORM_RELATIVE
DMSNESSetFunctionLocal SNESMSSetType SNES_CONVERGED_SNORM_RELATIVE
DMSNESSetJacobianLocal SNESNCG SNES_DIVERGED_DTOL
PetscConvEstCreate SNESNEWTONLS SNES_DIVERGED_FNORM_NAN
PetscConvEstDestroy SNESNGMRES SNES_DIVERGED_FUNCTION_COUNT
PetscConvEstSetFromOptions SNESNRICHARDSON SNES_DIVERGED_LINE_SEARCH
PetscConvEstSetUp SNESQN SNES_DIVERGED_LOCAL_MIN
PetscConvEstView SNESQNSetType SNES_DIVERGED_MAX_IT
Intermediate - Setting options for algorithms and data structures
DMAdaptorAdapt SNESGetSolution SNESNASMGetType
DMAdaptorGetSequenceLength SNESGetTolerances SNESNASMSetDamping
DMAdaptorGetSolver SNESGetType SNESNASMSetSubdomains
DMAdaptorSetSequenceLength SNESGetUseMatrixFree SNESNASMSetType
DMAdaptorSetSolver SNESJacobianFunction SNESNASMSetWeight
DMInterpolationAddPoints SNESLineSearchApply SNESNCGSetType
DMInterpolationGetCoordinates SNESLineSearchBTGetAlpha SNESNEWTONTR
DMInterpolationGetDim SNESLineSearchBTSetAlpha SNESNGMRESSetRestartFmRise
DMInterpolationGetDof SNESLineSearchComputeNorms SNESNGMRESSetRestartType
DMInterpolationGetVector SNESLineSearchGetDefaultMonitor SNESNGMRESSetSelectType
DMInterpolationRestoreVector SNESLineSearchGetOrder SNESNGSFunction
DMInterpolationSetDim SNESLineSearchGetPostCheck SNESNGSGetSweeps
DMInterpolationSetDof SNESLineSearchGetPreCheck SNESNGSGetTolerances
DMInterpolationSetUp SNESLineSearchGetReason SNESNGSSetSweeps
DMSNESGetBoundaryLocal SNESLineSearchGetTolerances SNESNGSSetTolerances
DMSNESSetBoundaryLocal SNESLineSearchGetType SNESNewtonTRGetPostCheck
KSPMonitorSNES SNESLineSearchMonitorCancel SNESNewtonTRGetPreCheck
KSPMonitorSNESLGResidualNormCreate SNESLineSearchMonitorSet SNESNewtonTRSetPostCheck
KSPMonitorSNESLGResidualNormDestroy SNESLineSearchMonitorSolutionUpdate SNESNewtonTRSetPreCheck
PetscConvEstGetConvRate SNESLineSearchReason SNESPATCH
PetscConvEstGetSolver SNESLineSearchSetComputeNorms SNESPythonSetType
PetscConvEstSetSolver SNESLineSearchSetDamping SNESQNSetRestartType
SNESASPIN SNESLineSearchSetDefaultMonitor SNESQNSetScaleType
SNESCOMPOSITE SNESLineSearchSetFromOptions SNESReasonViewFromOptions
SNESComputeJacobianDefault SNESLineSearchSetOrder SNESReset
SNESComputeJacobianDefaultColor SNESLineSearchSetPostCheck SNESSetApplicationContext
SNESConvergedDefault SNESLineSearchSetPreCheck SNESSetComputeApplicationContext
SNESConvergenceTestFunction SNESLineSearchSetTolerances SNESSetComputeInitialGuess
SNESFunction SNESLineSearchSetType SNESSetConvergedReason
SNESGetApplicationContext SNESLineSearchView SNESSetConvergenceHistory
SNESGetConvergedReason SNESLoad SNESSetDM
SNESGetConvergenceHistory SNESMSType SNESSetDivergenceTolerance
SNESGetDM SNESMonitorCancel SNESSetErrorIfNotConverged
SNESGetDivergenceTolerance SNESMonitorDefault SNESSetForceIteration
SNESGetErrorIfNotConverged SNESMonitorDefaultField SNESSetGridSequence
SNESGetForceIteration SNESMonitorFields SNESSetLagJacobian
SNESGetGridSequence SNESMonitorRange SNESSetLagPreconditioner
SNESGetIterationNumber SNESMonitorRatio SNESSetMaxLinearSolveFailures
SNESGetLagJacobian SNESMonitorRatioSetUp SNESSetMaxNonlinearStepFailures
SNESGetLagPreconditioner SNESMonitorResidual SNESSetNGS
SNESGetLinearSolveFailures SNESMonitorScaling SNESSetNPCSide
SNESGetLinearSolveIterations SNESMonitorSet SNESSetObjective
SNESGetMaxLinearSolveFailures SNESMonitorSolution SNESSetPicard
SNESGetMaxNonlinearStepFailures SNESMonitorSolutionUpdate SNESSetTolerances
SNESGetNPCSide SNESNASMGetDamping SNESSetTrustRegionTolerance
SNESGetNonlinearStepFailures SNESNASMGetNumber SNESSetType
SNESGetNumberFunctionEvals SNESNASMGetSNES SNESSetUseMatrixFree
SNESGetRhs SNESNASMGetSubdomains SNESViewFromOptions
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 SNESLINESEARCHNCGLINEAR SNESRegisterAll
MatCreateSNESMF SNESLINESEARCHNLEQERR SNESSHELL
MatSNESMFGetReuseBase SNESLINESEARCHSHELL SNESSetAlwaysComputesFinalResidual
MatSNESMFGetSNES SNESLineSearchAppendOptionsPrefix SNESSetCheckJacobianDomainError
MatSNESMFSetReuseBase SNESLineSearchGetDamping SNESSetConvergenceTest
SNESAppendOptionsPrefix SNESLineSearchGetLambda SNESSetFunctionDomainError
SNESComputeObjective SNESLineSearchGetOptionsPrefix SNESSetJacobianDomainError
SNESConvergedSkip SNESLineSearchGetVecs SNESSetOptionsPrefix
SNESDefaultMatrixFreeSetParameters2 SNESLineSearchPreCheckPicard SNESSetUp
SNESFunctionType SNESLineSearchRegister SNESSetUpdate
SNESGetAlwaysComputesFinalResidual SNESLineSearchRegisterAll SNESShellGetContext
SNESGetCheckJacobianDomainError SNESLineSearchSetLambda SNESShellSetContext
SNESGetFunction SNESLineSearchSetNorms SNESShellSetSolve
SNESGetFunctionDomainError SNESLineSearchSetUp SNESVISetComputeVariableBounds
SNESGetFunctionType SNESLineSearchSetVecs SNESVISetVariableBounds
SNESGetJacobian SNESLineSearchShellGetUserFunc SNES_NORM_ALWAYS
SNESGetJacobianDomainError SNESLineSearchShellSetUserFunc SNES_NORM_FINAL_ONLY
SNESGetNGS SNESMSGetDamping SNES_NORM_INITIAL_FINAL_ONLY
SNESGetNormSchedule SNESMSRegister SNES_NORM_INITIAL_ONLY
SNESGetObjective SNESMSRegisterAll SNES_NORM_NONE
SNESGetOptionsPrefix SNESMSRegisterDestroy
SNESGetPicard SNESMSSetDamping
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
DMCopyDMSNES SNESComputeJacobian SNESMSFinalizePackage
DMGetDMSNES SNESComputeNGS SNESMSInitializePackage
DMGetDMSNESWrite SNESFinalizePackage SNESMonitor
DMPlexComputeJacobianAction SNESGetFunctionNorm SNESMonitorSAWsCreate
DMPlexSNESComputeBoundaryFEM SNESGetNPC SNESMonitorSAWsDestroy
DMPlexSNESComputeJacobianFEM SNESGetNPCFunction SNESMonitorSetFromOptions
DMPlexSNESComputeResidualFEM SNESGetSolutionNorm SNESNASMGetSubdomainVecs
DMPlexSNESGetGeometryFVM SNESGetUpdateNorm SNESNASMSetComputeFinalJacobian
DMPlexSNESGetGradientDM SNESHasNPC SNESNewtonTRPostCheck
DMPlexSetSNESLocalFEM SNESInitializePackage SNESNewtonTRPreCheck
DMSNESCheckDiscretization SNESLineSearchCreate SNESSetCountersReset
DMSNESCheckFromOptions SNESLineSearchDestroy SNESSetFunctionNorm
DMSNESCheckJacobian SNESLineSearchGetNorms SNESSetFunctionType
DMSNESCheckResidual SNESLineSearchGetSNES SNESSetInitialFunction
DMSNESCopy SNESLineSearchGetVIFunctions SNESSetIterationNumber
MatMFFDComputeJacobian SNESLineSearchMonitor SNESSetKSP
PetscConvEstRateView SNESLineSearchMonitorSetFromOptions SNESSetLagJacobianPersists
SNESAddOptionsChecker SNESLineSearchPostCheck SNESSetLagPreconditionerPersists
SNESApplyNPC SNESLineSearchPreCheck SNESSetLineSearch
SNESCompositeAddSNES SNESLineSearchReset SNESSetNPC
SNESCompositeGetNumber SNESLineSearchSetFunction SNESSetNormSchedule
SNESCompositeGetSNES SNESLineSearchSetReason SNESSetUpMatrices
SNESCompositeSetDamping SNESLineSearchSetSNES SNESSetWorkVecs
SNESCompositeSetType SNESLineSearchSetVIFunctions
SNESComputeFunction SNESLineSearchSetWorkVecs
No deprecated routines

Table of Contents