petsc-3.14.6 2021-03-30
Report Typos and Errors

TSSetStepNumber

Sets the number of steps completed.

Synopsis

#include "petscts.h"  
PetscErrorCode TSSetStepNumber(TS ts,PetscInt steps)
Logically Collective on TS

Input Parameters

ts - the TS context
steps - number of steps completed so far

Notes

For most uses of the TS solvers the user need not explicitly call TSSetStepNumber(), as the step counter is appropriately updated in TSSolve()/TSStep()/TSRollBack(). Power users may call this routine to reinitialize timestepping by setting the step counter to zero (and time to the initial time) to solve a similar problem with different initial conditions or parameters. Other possible use case is to continue timestepping from a previously interrupted run in such a way that TS monitors will be called with a initial nonzero step counter.

See Also

TSGetStepNumber(), TSSetTime(), TSSetTimeStep(), TSSetSolution()

Level

advanced

Location

src/ts/interface/ts.c

Examples

src/ts/tutorials/ex11.c.html
src/ts/tutorials/ex20opt_p.c.html
src/ts/tutorials/ex20opt_ic.c.html
src/ts/tutorials/ex40.c.html
src/ts/tutorials/ex41.c.html
src/ts/tutorials/ex50.c.html
src/tao/unconstrained/tutorials/spectraladjointassimilation.c.html

Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages