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

Table of Contents