PETSc version 3.16.3

Time steppers for ODE and DAE - TS: Examples

The time-stepping (TS) component provides ODE and DAE integrators as well as pseudo-timestepping. TS internally employs SNES to solve the nonlinear problems at each time step (except for the Sundials functions, which use nonlinear solvers within Sundials). TS users can also set SNES options directly in application codes by first extracting the SNES context from the TS context via TSGetSNES() and then directly calling various SNES (and KSP and PC with further unwrapping) routines (e.g., PCSetType() ).

Beginner - Basic usage
DMDATSSetIFunctionLocal TSGLLEAdapt TSSSPSetNumStages
DMDATSSetIJacobianLocal TSGLLEAdaptType TSSSPSetType
DMDATSSetRHSFunctionLocal TSGLLEType TSSSPType
DMDATSSetRHSJacobianLocal TSGetConvergedReason TSSUNDIALS
DMTSSetIFunctionLocal TSGetEquationType TSSetEventTolerances
DMTSSetIJacobianLocal TSGetExactFinalTime TSSetExactFinalTime
DMTSSetRHSFunctionLocal TSGetKSP TSSetForcingFunction
TS TSGetPrevTime TSSetFromOptions
TS2SetSolution TSGetProblemType TSSetI2Function
TSALPHA TSGetSNES TSSetI2Jacobian
TSALPHA2 TSGetSolveTime TSSetIFunction
TSARKIMEX TSGetTime TSSetIJacobian
TSARKIMEXType TSGetTolerances TSSetProblemType
TSAdapt TSIRK TSSetRHSFunction
TSAdaptType TSIRKType TSSetRHSJacobian
TSBDF TSMIMEX TSSetSolution
TSBEULER TSMPRK TSSetSolutionFunction
TSBasicSymplectic TSMPRKType TSSetTolerances
TSBasicSymplecticType TSPSEUDO TSSolve
TSCN TSProblemType TSSundialsMonitorInternalSteps
TSConvergedReason TSRADAU5 TSSundialsSetMaxTimeStep
TSCreate TSRHSSplitSetRHSFunction TSSundialsSetMinTimeStep
TSDISCGRAD TSRK TSTHETA
TSDestroy TSRKType TSType
TSEIMEX TSROSW TSView
TSEIMEXType TSReset TS_CONVERGED_EVENT
TSEULER TSRosWSetType TS_CONVERGED_ITERATING
TSEquationType TSRosWType TS_CONVERGED_ITS
TSExactFinalTimeOption TSSSP TS_CONVERGED_PSEUDO_FATOL
TSGLEE TSSSPGetNumStages TS_CONVERGED_PSEUDO_FRTOL
TSGLEEMode TSSSPGetType TS_CONVERGED_TIME
TSGLEEType TSSSPRKS104 TS_CONVERGED_USER
TSGLLE TSSSPRKS2 TS_DIVERGED_NONLINEAR_SOLVE
TSGLLEAcceptType TSSSPRKS3 TS_DIVERGED_STEP_REJECTED
Intermediate - Setting options for algorithms and data structures
DMTSSetBoundaryLocal TSGetSNESFailures TSRKSetType
TS2GetSolution TSGetSNESIterations TSROSW2M
TSADAPTBASIC TSGetSolution TSROSW2P
TSADAPTCFL TSGetStepNumber TSROSW4L
TSADAPTDSP TSGetStepRejections TSROSWASSP3P3S1C
TSADAPTGLEE TSGetTimeError TSROSWGRK4T
TSADAPTNONE TSGetTimeStep TSROSWLASSP3P4S2C
TSARKIMEXGetFullyImplicit TSGetType TSROSWLLSSP3P4S2C
TSARKIMEXGetType TSGetUseSplitRHSFunction TSROSWRA34PW2
TSARKIMEXSetFullyImplicit TSIRKGetNumStages TSROSWRA3PW
TSARKIMEXSetType TSIRKGetType TSROSWRODAS3
TSAdaptDSPSetFilter TSIRKSetNumStages TSROSWSANDU3
TSAdaptDSPSetPID TSIRKSetType TSROSWSHAMP4
TSAdaptGetClip TSInterpolate TSROSWTHETA1
TSAdaptGetMaxIgnore TSLoad TSROSWTHETA2
TSAdaptGetSafety TSMPRKGetType TSROSWVELDD4
TSAdaptGetScaleSolveFailed TSMPRKSetType TSResetTrajectory
TSAdaptGetStepLimits TSMonitorCancel TSRosWGetType
TSAdaptGetType TSMonitorDefault TSRosWSetRecomputeJacobian
TSAdaptLoad TSMonitorDrawCtxCreate TSSetApplicationContext
TSAdaptSetAlwaysAccept TSMonitorDrawCtxDestroy TSSetCFLTimeLocal
TSAdaptSetClip TSMonitorDrawError TSSetDM
TSAdaptSetMaxIgnore TSMonitorDrawSolution TSSetErrorIfStepFails
TSAdaptSetMonitor TSMonitorDrawSolutionFunction TSSetEventHandler
TSAdaptSetSafety TSMonitorDrawSolutionPhase TSSetFunctionDomainError
TSAdaptSetScaleSolveFailed TSMonitorEnvelope TSSetMatStructure
TSAdaptSetStepLimits TSMonitorEnvelopeCtxCreate TSSetMaxSNESFailures
TSAdaptSetType TSMonitorEnvelopeCtxDestroy TSSetMaxStepRejections
TSAlpha2SetRadius TSMonitorEnvelopeGetBounds TSSetMaxSteps
TSAlphaSetRadius TSMonitorError TSSetMaxTime
TSBASICSYMPLECTICSIEULER TSMonitorExtreme TSSetPostEvaluate
TSBASICSYMPLECTICVELVERLET TSMonitorLGCtxCreate TSSetPostStage
TSBDFGetOrder TSMonitorLGCtxDestroy TSSetPostStep
TSBDFSetOrder TSMonitorLGCtxSetDisplayVariables TSSetPreStage
TSBasicSymplecticGetType TSMonitorLGCtxSetTransform TSSetPreStep
TSBasicSymplecticSetType TSMonitorLGCtxSetVariableNames TSSetSaveTrajectory
TSComputeIFunctionLinear TSMonitorLGError TSSetTime
TSComputeIJacobianDefaultColor TSMonitorLGGetVariableNames TSSetTimeError
TSComputeRHSFunctionLinear TSMonitorLGSetDisplayVariables TSSetTimeStep
TSComputeRHSJacobianConstant TSMonitorLGSetTransform TSSetType
TSDMSwarmMonitorMoments TSMonitorLGSetVariableNames TSSetUseSplitRHSFunction
TSDiscGradGetFormulation TSMonitorLGSolution TSSundialsSetTolerance
TSDiscGradSetFormulation TSMonitorSPEigCtxCreate TSSundialsSetType
TSEIMEXSetMaxRows TSMonitorSPEigCtxDestroy TSTRAJECTORYBASIC
TSEIMEXSetOrdAdapt TSMonitorSPSwarmSolution TSTRAJECTORYMEMORY
TSEIMEXSetRowCol TSMonitorSet TSTRAJECTORYSINGLEFILE
TSGLEEGetType TSMonitorSolution TSTRAJECTORYVISUALIZATION
TSGLEESetType TSMonitorSolutionVTK TSThetaSetEndpoint
TSGLLESetAcceptType TSMonitorSolutionVTKDestroy TSThetaSetTheta
TSGLLESetType TSPseudoSetTimeStep TSTrajectoryMemorySetType
TSGetAdapt TSPythonSetType TSTrajectorySetMaxCpsDisk
TSGetApplicationContext TSRHSJacobianSetReuse TSTrajectorySetMaxCpsRAM
TSGetAuxSolution TSRHSSplitGetIS TSTrajectorySetMaxUnitsDisk
TSGetDM TSRHSSplitSetIS TSTrajectorySetMaxUnitsRAM
TSGetKSPIterations TSRKGetMultirate TSTrajectorySetTransform
TSGetNumEvents TSRKGetOrder TSTrajectorySetVariableNames
TSGetOptionsPrefix TSRKGetType TSTrajectoryViewFromOptions
TSGetRHSJacobian TSRKSetMultirate TSViewFromOptions
Advanced - Setting more advanced options and customization
DMTSGetForcingFunction TSBasicSymplecticRegisterDestroy TSPseudoSetTimeStepIncrement
DMTSGetI2Function TSComputeExactError TSPseudoSetVerifyTimeStep
DMTSGetI2Jacobian TSComputeIJacobianConstant TSPseudoTimeStepDefault
DMTSGetIFunction TSComputeInitialCondition TSPseudoVerifyTimeStep
DMTSGetIJacobian TSEvaluateStep TSPseudoVerifyTimeStepDefault
DMTSGetRHSFunction TSEvaluateWLTE TSRHSJacobianTest
DMTSGetRHSJacobian TSGLEE23 TSRHSJacobianTestTranspose
DMTSGetSolutionFunction TSGLEE24 TSRHSSplitGetSubTS
DMTSGetTransientVariable TSGLEE25i TSRHSSplitGetSubTSs
DMTSSetForcingFunction TSGLEE35 TSRK1FE
DMTSSetI2Function TSGLEEEXRK2A TSRK2A
DMTSSetI2Jacobian TSGLEERK285EX TSRK3
DMTSSetIFunction TSGLEERK32G1 TSRK3BS
DMTSSetIFunctionSerialize TSGLEERegister TSRK4
DMTSSetIJacobian TSGLEERegisterAll TSRK5BS
DMTSSetIJacobianSerialize TSGLEERegisterDestroy TSRK5DP
DMTSSetRHSFunction TSGLLEAcceptRegister TSRK5F
DMTSSetRHSJacobian TSGLLEAdaptRegister TSRK6VR
DMTSSetSolutionFunction TSGLLEAdaptRegisterAll TSRK7VR
DMTSSetTransientVariable TSGLLEGetAdapt TSRK8VR
SNESTSFormFunction TSGLLERegister TSRKRegister
TSARKIMEX1BEE TSGLLERegisterAll TSRKRegisterAll
TSARKIMEX2C TSGetCFLTime TSRKRegisterDestroy
TSARKIMEX2D TSGetComputeExactError TSRegister
TSARKIMEX2E TSGetComputeInitialCondition TSRegisterAll
TSARKIMEX3 TSGetI2Function TSRestartStep
TSARKIMEX4 TSGetI2Jacobian TSRollBack
TSARKIMEX5 TSGetIFunction TSRosWRegister
TSARKIMEXA2 TSGetIJacobian TSRosWRegisterAll
TSARKIMEXARS122 TSGetMaxSteps TSRosWRegisterDestroy
TSARKIMEXARS443 TSGetMaxTime TSSetComputeExactError
TSARKIMEXBPR3 TSGetRHSFunction TSSetComputeInitialCondition
TSARKIMEXL2 TSGetSolutionComponents TSSetConvergedReason
TSARKIMEXPRSSP2 TSGetStages TSSetEquationType
TSARKIMEXRegister TSGetTrajectory TSSetOptionsPrefix
TSARKIMEXRegisterAll TSIRKRegister TSSetPostEventIntervalStep
TSARKIMEXRegisterDestroy TSIRKRegisterAll TSSetStepNumber
TSAdaptHistoryGetStep TSIRKRegisterDestroy TSSetTransientVariable
TSAdaptHistorySetHistory TSIRKTableauCreate TSSetUp
TSAdaptHistorySetTrajectory TSMPRK2A22 TSSundialsGetIterations
TSAdaptRegister TSMPRK2A23 TSSundialsGetPC
TSAdaptRegisterAll TSMPRK2A32 TSSundialsSetGramSchmidtType
TSAdaptSetCheckStage TSMPRK2A33 TSSundialsSetLinearTolerance
TSAdaptSetTimeStepIncreaseDelay TSMPRK3P2M TSSundialsSetMaxl
TSAlpha2GetParams TSMPRKP2 TSSundialsSetMaxord
TSAlpha2SetParams TSMPRKP3 TSThetaGetEndpoint
TSAlphaGetParams TSMPRKRegister TSThetaGetTheta
TSAlphaSetParams TSMPRKRegisterAll TSTrajectory
TSAppendOptionsPrefix TSMPRKRegisterDestroy TSTrajectorySetKeepFiles
TSBasicSymplecticRegister TSPseudoIncrementDtFromInitialDt TSTrajectorySetUseHistory
TSBasicSymplecticRegisterAll TSPseudoSetMaxTimeStep TSVISetVariableBounds
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
DMCopyDMTS TSComputeLinearStability TSRKFinalizePackage
DMGetDMTS TSComputeRHSFunction TSRKGetTableau
DMGetDMTSWrite TSComputeRHSJacobian TSRKInitializePackage
DMPlexTSComputeBoundary TSComputeSolutionFunction TSRosWFinalizePackage
DMPlexTSComputeIFunctionFEM TSComputeTransientVariable TSRosWInitializePackage
DMPlexTSComputeIJacobianFEM TSErrorWeightedENorm TSRosWRegisterRos4
DMPlexTSComputeRHSFunctionFVM TSErrorWeightedENorm2 TSSSPFinalizePackage
DMTSCheckFromOptions TSErrorWeightedENormInfinity TSSSPInitializePackage
DMTSCheckJacobian TSErrorWeightedNorm TSSetSNES
DMTSCheckResidual TSErrorWeightedNorm2 TSStep
DMTSCopy TSErrorWeightedNormInfinity TSTrajectoryCreate
SNESTSFormJacobian TSFinalizePackage TSTrajectoryDestroy
TSADAPTHISTORY TSFunctionDomainError TSTrajectoryGet
TSARKIMEXFinalizePackage TSGLEEFinalizePackage TSTrajectoryGetNumSteps
TSARKIMEXInitializePackage TSGLEEInitializePackage TSTrajectoryGetSolutionOnly
TSAdaptCandidateAdd TSGLLEAdaptInitializePackage TSTrajectoryGetType
TSAdaptCandidatesClear TSGLLEFinalizePackage TSTrajectoryGetUpdatedHistoryVecs
TSAdaptCandidatesGet TSGLLEInitializePackage TSTrajectoryGetVecs
TSAdaptCheckStage TSHasTransientVariable TSTrajectoryRegister
TSAdaptChoose TSIRKFinalizePackage TSTrajectoryRegisterAll
TSAdaptCreate TSIRKInitializePackage TSTrajectoryReset
TSAdaptFinalizePackage TSInitializePackage TSTrajectoryRestoreUpdatedHistoryVecs
TSAdaptInitializePackage TSMPRKFinalizePackage TSTrajectorySet
TSAdaptReset TSMPRKInitializePackage TSTrajectorySetDirname
TSBasicSymplecticFinalizePackage TSMonitor TSTrajectorySetFiletemplate
TSBasicSymplecticInitializePackage TSMonitorSetFromOptions TSTrajectorySetFromOptions
TSClone TSPostEvaluate TSTrajectorySetMonitor
TSComputeForcingFunction TSPostStage TSTrajectorySetSolutionOnly
TSComputeI2Function TSPostStep TSTrajectorySetType
TSComputeI2Jacobian TSPreStage TSTrajectorySetUp
TSComputeIFunction TSPreStep TSTrajectoryView
TSComputeIJacobian TSPseudoComputeTimeStep
Deprecated - Functionality scheduled for removal in future versions
TSGetDuration TSGetTotalSteps TSSetInitialTimeStep
TSGetTimeStepNumber TSSetDuration

Table of Contents