petsc-master 2016-09-27
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
DMDASNESSetFunctionLocal SNESLineSearch SNESType
DMDASNESSetJacobianLocal SNESLineSearchType SNESVINEWTONRSLS
DMDASNESSetObjectiveLocal SNESMS SNESVINEWTONSSLS
DMDASNESSetPicardLocal SNESMSSetType SNESView
DMSNESSetFunctionLocal SNESNCG SNES_CONERGED_ITERATING
DMSNESSetJacobianLocal SNESNEWTONLS SNES_CONVERGED_FNORM_ABS
SNES SNESNGMRES SNES_CONVERGED_FNORM_RELATIVE
SNESANDERSON SNESNRICHARDSON SNES_CONVERGED_SNORM_RELATIVE
SNESConvergedReason SNESQN SNES_DIVERGED_DTOL
SNESCreate SNESQNSetType SNES_DIVERGED_FNORM_NAN
SNESDestroy SNESReasonView SNES_DIVERGED_FUNCTION_COUNT
SNESFAS SNESSetFromOptions SNES_DIVERGED_LINE_SEARCH
SNESFASType SNESSetFunction SNES_DIVERGED_LOCAL_MIN
SNESGetKSP SNESSetJacobian SNES_DIVERGED_MAX_IT
SNESGetLineSearch SNESSetSolution
SNESKSPONLY SNESSolve
Intermediate - Setting options for algorithms and data structures
DMSNESSetBoundaryLocal SNESLineSearchDestroy SNESNASMSetType
KSPMonitorSNES SNESLineSearchGetDefaultMonitor SNESNCGSetType
KSPMonitorSNESLGResidualNormCreate SNESLineSearchGetOrder SNESNEWTONTR
KSPMonitorSNESLGResidualNormDestroy SNESLineSearchGetPostCheck SNESNGMRESSetRestartFmRise
SNESASPIN SNESLineSearchGetPreCheck SNESNGMRESSetRestartType
SNESCOMPOSITE SNESLineSearchGetReason SNESNGMRESSetSelectType
SNESComputeJacobianDefault SNESLineSearchGetTolerances SNESNGSFunction
SNESComputeJacobianDefaultColor SNESLineSearchMonitorCancel SNESNGSGetSweeps
SNESConvergedDefault SNESLineSearchMonitorSet SNESNGSGetTolerances
SNESConvergenceTestFunction SNESLineSearchMonitorSolutionUpdate SNESNGSSetSweeps
SNESFASGetType SNESLineSearchReason SNESNGSSetTolerances
SNESFASSetLevels SNESLineSearchSetComputeNorms SNESPythonSetType
SNESFASSetType SNESLineSearchSetDamping SNESQNSetRestartType
SNESFunction SNESLineSearchSetDefaultMonitor SNESQNSetScaleType
SNESGetApplicationContext SNESLineSearchSetFromOptions SNESReasonViewFromOptions
SNESGetConvergedReason SNESLineSearchSetOrder SNESReset
SNESGetConvergenceHistory SNESLineSearchSetPostCheck SNESSetApplicationContext
SNESGetDM SNESLineSearchSetPreCheck SNESSetComputeApplicationContext
SNESGetErrorIfNotConverged SNESLineSearchSetTolerances SNESSetComputeInitialGuess
SNESGetGridSequence SNESLineSearchSetType SNESSetConvergedReason
SNESGetIterationNumber SNESLineSearchView SNESSetConvergenceHistory
SNESGetLagJacobian SNESLoad SNESSetDM
SNESGetLagPreconditioner SNESMSType SNESSetErrorIfNotConverged
SNESGetLinearSolveFailures SNESMonitorCancel SNESSetGridSequence
SNESGetLinearSolveIterations SNESMonitorDefault SNESSetLagJacobian
SNESGetMaxLinearSolveFailures SNESMonitorDefaultField SNESSetLagPreconditioner
SNESGetMaxNonlinearStepFailures SNESMonitorFields SNESSetMaxLinearSolveFailures
SNESGetNPCSide SNESMonitorRange SNESSetMaxNonlinearStepFailures
SNESGetNonlinearStepFailures SNESMonitorRatio SNESSetNGS
SNESGetNumberFunctionEvals SNESMonitorRatioSetUp SNESSetNPCSide
SNESGetRhs SNESMonitorResidual SNESSetObjective
SNESGetSolution SNESMonitorSet SNESSetPicard
SNESGetTolerances SNESMonitorSolution SNESSetTolerances
SNESGetType SNESMonitorSolutionUpdate SNESSetTrustRegionTolerance
SNESJacobianFunction SNESNASMGetDamping SNESSetType
SNESLineSearchApply SNESNASMGetSubdomains SNESTEST
SNESLineSearchBTGetAlpha SNESNASMGetType SNESUpdateCheckJacobian
SNESLineSearchBTSetAlpha SNESNASMSetDamping
SNESLineSearchComputeNorms SNESNASMSetSubdomains
Advanced - Setting more advanced options and customization
DMSNESGetFunction SNESFASSetLog SNESLineSearchRegisterAll
DMSNESGetJacobian SNESFASSetMonitor SNESLineSearchSetLambda
DMSNESGetNGS SNESFASSetNumberSmoothDown SNESLineSearchSetNorms
DMSNESGetObjective SNESFASSetNumberSmoothUp SNESLineSearchSetUp
DMSNESGetPicard SNESFASSetRScale SNESLineSearchSetVecs
DMSNESSetFunction SNESFASSetRestriction SNESLineSearchShellGetUserFunc
DMSNESSetJacobian SNESFunctionType SNESLineSearchShellSetUserFunc
DMSNESSetNGS SNESGetAlwaysComputesFinalResidual SNESMSRegister
DMSNESSetObjective SNESGetFunction SNESMSRegisterAll
DMSNESSetPicard SNESGetFunctionDomainError SNESMSRegisterDestroy
MatCreateSNESMF SNESGetFunctionType SNESMatrixFreeCreate2
SNESAppendOptionsPrefix SNESGetJacobian SNESMonitorFunction
SNESComputeObjective SNESGetNGS SNESMonitorSAWs
SNESConvergedSkip SNESGetNormSchedule SNESNASM
SNESDefaultMatrixFreeSetParameters2 SNESGetObjective SNESNGS
SNESFASCycleGetCorrection SNESGetOptionsPrefix SNESNormSchedule
SNESFASCycleGetSmoother SNESGetPicard SNESObjectiveComputeFunctionDefaultFD
SNESFASCycleGetSmootherDown SNESGetSolutionUpdate SNESObjectiveFunction
SNESFASCycleGetSmootherUp SNESKSPGetParametersEW SNESRegister
SNESFASCycleIsFine SNESKSPGetUseEW SNESRegisterAll
SNESFASCycleSetCycles SNESKSPSetParametersEW SNESSHELL
SNESFASFullSetDownSweep SNESKSPSetUseEW SNESSetAlwaysComputesFinalResidual
SNESFASGetCoarseSolve SNESLINESEARCHBASIC SNESSetConvergenceTest
SNESFASGetCycleSNES SNESLINESEARCHBT SNESSetFunctionDomainError
SNESFASGetGalerkin SNESLINESEARCHCP SNESSetOptionsPrefix
SNESFASGetInjection SNESLINESEARCHL2 SNESSetUp
SNESFASGetInterpolation SNESLINESEARCHNLEQERR SNESSetUpdate
SNESFASGetLevels SNESLINESEARCHSHELL SNESShellGetContext
SNESFASGetRestriction SNESLineSearchAppendOptionsPrefix SNESShellSetContext
SNESFASGetSmoother SNESLineSearchGetDamping SNESShellSetSolve
SNESFASGetSmootherDown SNESLineSearchGetLambda SNESVISetComputeVariableBounds
SNESFASGetSmootherUp SNESLineSearchGetOptionsPrefix SNESVISetVariableBounds
SNESFASSetContinuation SNESLineSearchGetVecs SNES_NORM_ALWAYS
SNESFASSetCycles SNESLineSearchPostCheckFunction SNES_NORM_FINAL_ONLY
SNESFASSetGalerkin SNESLineSearchPreCheckFunction SNES_NORM_INITIAL_FINAL_ONLY
SNESFASSetInjection SNESLineSearchPreCheckPicard SNES_NORM_INITIAL_ONLY
SNESFASSetInterpolation SNESLineSearchRegister SNES_NORM_NONE
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
DMCopyDMSNES SNESComputeFunction SNESLineSearchSetSNES
DMGetDMSNES SNESComputeJacobian SNESLineSearchSetVIFunctions
DMGetDMSNESWrite SNESComputeNGS SNESLineSearchSetWorkVecs
DMPlexGetCellFields SNESFASCreateCoarseVec SNESMSFinalizePackage
DMPlexGetFaceFields SNESFASCycleGetInjection SNESMSInitializePackage
DMPlexGetFaceGeometry SNESFASCycleGetInterpolation SNESMonitor
DMPlexRestoreCellFields SNESFASCycleGetRScale SNESMonitorSAWsCreate
DMPlexRestoreFaceFields SNESFASCycleGetRestriction SNESMonitorSAWsDestroy
DMPlexRestoreFaceGeometry SNESFASRestrict SNESMonitorSetFromOptions
DMPlexSNESComputeBoundaryFEM SNESFinalizePackage SNESNASMGetSubdomainVecs
DMPlexSNESComputeJacobianActionFEM SNESGetFunctionNorm SNESNASMSetComputeFinalJacobian
DMPlexSNESComputeJacobianFEM SNESGetNPC SNESSetCountersReset
DMPlexSNESComputeResidualFEM SNESGetNPCFunction SNESSetFunctionNorm
DMPlexSNESGetGeometryFEM SNESHasNPC SNESSetFunctionType
DMPlexSNESGetGeometryFVM SNESInitializePackage SNESSetInitialFunction
DMPlexSNESGetGradientDM SNESLineSearchCreate SNESSetIterationNumber
DMPlexSetSNESLocalFEM SNESLineSearchGetNorms SNESSetKSP
DMSNESCopy SNESLineSearchGetSNES SNESSetLagJacobianPersists
MatMFFDComputeJacobian SNESLineSearchGetVIFunctions SNESSetLagPreconditionerPersists
SNESAddOptionsChecker SNESLineSearchMonitor SNESSetLineSearch
SNESApplyNPC SNESLineSearchMonitorSetFromOptions SNESSetNPC
SNESCompositeAddSNES SNESLineSearchPostCheck SNESSetNormSchedule
SNESCompositeGetNumber SNESLineSearchPreCheck SNESSetUpMatrices
SNESCompositeGetSNES SNESLineSearchReset SNESSetWorkVecs
SNESCompositeSetDamping SNESLineSearchSetFunction
SNESCompositeSetType SNESLineSearchSetReason
No deprecated routines

Table of Contents