:orphan: # TSSetExactFinalTime Determines whether to adapt the final time step to match the exact final time, interpolate solution to the exact final time, or just return at the final time `TS` computed. ## Synopsis ``` #include "petscts.h" PetscErrorCode TSSetExactFinalTime(TS ts, TSExactFinalTimeOption eftopt) ``` Logically Collective ## Input Parameters - ***ts -*** the time-step context - ***eftopt -*** exact final time option ```none TS_EXACTFINALTIME_STEPOVER - Don't do anything if final time is exceeded TS_EXACTFINALTIME_INTERPOLATE - Interpolate back to final time TS_EXACTFINALTIME_MATCHSTEP - Adapt final time step to match the final time ``` ## Options Database Key - ***-ts_exact_final_time -*** select the final step at runtime ## Note If you use the option `TS_EXACTFINALTIME_STEPOVER` the solution may be at a very different time then the final time you selected. ## See Also [](ch_ts), `TS`, `TSExactFinalTimeOption`, `TSGetExactFinalTime()` ## Level beginner ## Location src/ts/interface/ts.c ## Examples src/tao/unconstrained/tutorials/burgers_spectral.c
src/tao/unconstrained/tutorials/spectraladjointassimilation.c
src/ts/tutorials/ex1.c
src/ts/tutorials/ex10.c
src/ts/tutorials/ex11.c
src/ts/tutorials/ex11_sa.c
src/ts/tutorials/ex12.c
src/ts/tutorials/ex13.c
src/ts/tutorials/ex14.c
src/ts/tutorials/ex15.c
src/ts/tutorials/ex16.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)