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

Table of Contents