petsc-3.10.3 2018-12-18
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 SNESSetFunction
DMAdaptorDestroy SNESDestroy SNESSetJacobian
DMAdaptorSetFromOptions SNESFASType SNESSetSolution
DMAdaptorSetUp SNESGetKSP SNESSolve
DMAdaptorView SNESGetLineSearch SNESType
DMDASNESSetFunctionLocal SNESKSPONLY SNESVINEWTONRSLS
DMDASNESSetJacobianLocal SNESLineSearch SNESVINEWTONSSLS
DMDASNESSetObjectiveLocal SNESLineSearchType SNESView
DMDASNESSetPicardLocal SNESMS SNES_CONERGED_ITERATING
DMSNESSetFunctionLocal SNESMSSetType SNES_CONVERGED_FNORM_ABS
DMSNESSetJacobianLocal SNESNCG SNES_CONVERGED_FNORM_RELATIVE
PetscConvEstCreate SNESNEWTONLS SNES_CONVERGED_SNORM_RELATIVE
PetscConvEstDestroy SNESNGMRES SNES_DIVERGED_DTOL
PetscConvEstSetFromOptions SNESNRICHARDSON SNES_DIVERGED_FNORM_NAN
PetscConvEstSetUp SNESQN SNES_DIVERGED_FUNCTION_COUNT
PetscConvEstView SNESQNSetType SNES_DIVERGED_LINE_SEARCH
SNES SNESReasonView SNES_DIVERGED_LOCAL_MIN
SNESANDERSON SNESResetFromOptions SNES_DIVERGED_MAX_IT
SNESConvergedReason SNESSetFromOptions
Intermediate - Setting options for algorithms and data structures
DMAdaptorAdapt SNESLineSearchApply SNESNASMSetDamping
DMAdaptorGetSequenceLength SNESLineSearchBTGetAlpha SNESNASMSetSubdomains
DMAdaptorGetSolver SNESLineSearchBTSetAlpha SNESNASMSetType
DMAdaptorSetSequenceLength SNESLineSearchComputeNorms 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
SNESGetForceIteration SNESMSType SNESSetDivergenceTolerance
SNESGetGridSequence SNESMonitorCancel SNESSetErrorIfNotConverged
SNESGetIterationNumber SNESMonitorDefault SNESSetForceIteration
SNESGetLagJacobian SNESMonitorDefaultField SNESSetGridSequence
SNESGetLagPreconditioner SNESMonitorFields SNESSetLagJacobian
SNESGetLinearSolveFailures SNESMonitorRange SNESSetLagPreconditioner
SNESGetLinearSolveIterations SNESMonitorRatio SNESSetMaxLinearSolveFailures
SNESGetMaxLinearSolveFailures SNESMonitorRatioSetUp SNESSetMaxNonlinearStepFailures
SNESGetMaxNonlinearStepFailures SNESMonitorResidual SNESSetNGS
SNESGetNPCSide SNESMonitorScaling SNESSetNPCSide
SNESGetNonlinearStepFailures SNESMonitorSet SNESSetObjective
SNESGetNumberFunctionEvals SNESMonitorSolution SNESSetPicard
SNESGetRhs SNESMonitorSolutionUpdate SNESSetTolerances
SNESGetSolution SNESNASMGetDamping SNESSetTrustRegionTolerance
SNESGetTolerances SNESNASMGetNumber SNESSetType
SNESGetType SNESNASMGetSNES SNESSetUseMatrixFree
SNESGetUseMatrixFree SNESNASMGetSubdomains
SNESJacobianFunction SNESNASMGetType
Advanced - Setting more advanced options and customization
DMSNESGetFunction SNESGetPicard SNESMSRegisterDestroy
DMSNESGetJacobian SNESGetSolutionUpdate SNESMatrixFreeCreate2
DMSNESGetNGS SNESKSPGetParametersEW SNESMonitorFunction
DMSNESGetObjective SNESKSPGetUseEW SNESMonitorSAWs
DMSNESGetPicard SNESKSPSetParametersEW SNESNASM
DMSNESSetFunction SNESKSPSetUseEW SNESNGS
DMSNESSetJacobian SNESLINESEARCHBASIC SNESNormSchedule
DMSNESSetNGS SNESLINESEARCHBT SNESObjectiveComputeFunctionDefaultFD
DMSNESSetObjective SNESLINESEARCHCP SNESObjectiveFunction
DMSNESSetPicard SNESLINESEARCHL2 SNESRegister
MatCreateSNESMF SNESLINESEARCHNLEQERR SNESRegisterAll
MatSNESMFGetReuseBase SNESLINESEARCHSHELL SNESSHELL
MatSNESMFGetSNES 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
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
DMCopyDMSNES SNESCompositeGetSNES SNESLineSearchSetSNES
DMGetDMSNES SNESCompositeSetDamping SNESLineSearchSetVIFunctions
DMGetDMSNESWrite SNESCompositeSetType SNESLineSearchSetWorkVecs
DMPlexComputeJacobianAction SNESComputeFunction SNESMSFinalizePackage
DMPlexGetCellFields SNESComputeJacobian SNESMSInitializePackage
DMPlexGetFaceFields SNESComputeNGS SNESMonitor
DMPlexGetFaceGeometry SNESFinalizePackage SNESMonitorSAWsCreate
DMPlexRestoreCellFields SNESGetFunctionNorm SNESMonitorSAWsDestroy
DMPlexRestoreFaceFields SNESGetNPC SNESMonitorSetFromOptions
DMPlexRestoreFaceGeometry SNESGetNPCFunction SNESNASMGetSubdomainVecs
DMPlexSNESComputeBoundaryFEM SNESHasNPC SNESNASMSetComputeFinalJacobian
DMPlexSNESComputeJacobianFEM SNESInitializePackage SNESSetCountersReset
DMPlexSNESComputeResidualFEM SNESLineSearchCreate SNESSetFunctionNorm
DMPlexSNESGetGeometryFVM SNESLineSearchDestroy SNESSetFunctionType
DMPlexSNESGetGradientDM SNESLineSearchGetNorms SNESSetInitialFunction
DMPlexSetSNESLocalFEM SNESLineSearchGetSNES SNESSetIterationNumber
DMSNESCheckFromOptions 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

Table of Contents