:orphan: # TSAdaptHistorySetHistory Sets the time history in the adaptor ## Synopsis ``` #include "petscts.h" PetscErrorCode TSAdaptHistorySetHistory(TSAdapt adapt, PetscInt n, PetscReal hist[], PetscBool backward) ``` Logically Collective ## Input Parameters - ***adapt -*** the `TSAdapt` context - ***n -*** size of the time history - ***hist -*** the time history - ***backward -*** if the time history has to be followed backward ## Note The time history is internally copied, and the user can free the hist array. The user still needs to specify the termination of the solve via `TSSetMaxSteps()`. ## See Also [](ch_ts), `TSGetAdapt()`, `TSAdaptSetType()`, `TSAdaptHistorySetTrajectory()`, `TSADAPTHISTORY` ## Level advanced ## Location src/ts/adapt/impls/history/adapthist.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/adapt/impls/history/adapthist.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)