:orphan: # TSSetTimeSpan sets the time span. The solution will be computed and stored for each time requested in the span ## Synopsis ``` #include "petscts.h" PetscErrorCode TSSetTimeSpan(TS ts, PetscInt n, PetscReal *span_times) ``` Collective ## Input Parameters - ***ts -*** the time-stepper - ***n -*** number of the time points (>=2) - ***span_times -*** array of the time points. The first element and the last element are the initial time and the final time respectively. ## Options Database Key - ***-ts_time_span -*** Sets the time span ## Notes The elements in tspan must be all increasing. They correspond to the intermediate points for time integration. `TS_EXACTFINALTIME_MATCHSTEP` must be used to make the last time step in each sub-interval match the intermediate points specified. The intermediate solutions are saved in a vector array that can be accessed with `TSGetTimeSpanSolutions()`. Thus using time span may pressure the memory system when using a large number of span points. ## See Also [](ch_ts), `TS`, `TSGetTimeSpan()`, `TSGetTimeSpanSolutions()` ## Level intermediate ## Location src/ts/interface/ts.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/interface/ts.c) [Index of all TS routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)