petsc-master 2018-01-14
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 SNESTEST
SNESLineSearchApply SNESNASMGetType SNESUpdateCheckJacobian
Advanced - Setting more advanced options and customization
DMSNESGetFunction SNESKSPGetUseEW SNESMatrixFreeCreate2
DMSNESGetJacobian SNESKSPSetParametersEW SNESMonitorFunction
DMSNESGetNGS SNESKSPSetUseEW SNESMonitorSAWs
DMSNESGetObjective SNESLINESEARCHBASIC SNESNASM
DMSNESGetPicard SNESLINESEARCHBT SNESNGS
DMSNESSetFunction SNESLINESEARCHCP SNESNormSchedule
DMSNESSetJacobian SNESLINESEARCHL2 SNESObjectiveComputeFunctionDefaultFD
DMSNESSetNGS SNESLINESEARCHNLEQERR SNESObjectiveFunction
DMSNESSetObjective SNESLINESEARCHSHELL SNESRegister
DMSNESSetPicard SNESLineSearchAppendOptionsPrefix SNESRegisterAll
MatCreateSNESMF SNESLineSearchGetDamping SNESSHELL
SNESAppendOptionsPrefix SNESLineSearchGetLambda SNESSetAlwaysComputesFinalResidual
SNESComputeObjective SNESLineSearchGetOptionsPrefix SNESSetConvergenceTest
SNESConvergedSkip SNESLineSearchGetVecs SNESSetFunctionDomainError
SNESDefaultMatrixFreeSetParameters2 SNESLineSearchPostCheckFunction SNESSetOptionsPrefix
SNESFunctionType SNESLineSearchPreCheckFunction SNESSetUp
SNESGetAlwaysComputesFinalResidual SNESLineSearchPreCheckPicard SNESSetUpdate
SNESGetFunction SNESLineSearchRegister SNESShellGetContext
SNESGetFunctionDomainError SNESLineSearchRegisterAll SNESShellSetContext
SNESGetFunctionType SNESLineSearchSetLambda SNESShellSetSolve
SNESGetJacobian SNESLineSearchSetNorms SNESVISetComputeVariableBounds
SNESGetNGS SNESLineSearchSetUp SNESVISetVariableBounds
SNESGetNormSchedule SNESLineSearchSetVecs SNES_NORM_ALWAYS
SNESGetObjective SNESLineSearchShellGetUserFunc SNES_NORM_FINAL_ONLY
SNESGetOptionsPrefix SNESLineSearchShellSetUserFunc SNES_NORM_INITIAL_FINAL_ONLY
SNESGetPicard SNESMSRegister SNES_NORM_INITIAL_ONLY
SNESGetSolutionUpdate SNESMSRegisterAll SNES_NORM_NONE
SNESKSPGetParametersEW 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

Table of Contents