# TSGetComputeInitialCondition
Get the function used to automatically compute an initial condition for the timestepping. 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSGetComputeInitialCondition(TS ts, PetscErrorCode (**initCondition)(TS, Vec))
```
Not collective


## Input Parameter

- ***ts -*** time stepping context



## Output Parameter

- ***initConditions -*** The function which computes an initial condition


The calling sequence for the function is
```none
 initCondition(TS ts, Vec u)
 ts - The timestepping context
 u  - The input vector in which the initial condition is stored
```





## See Also
 [](chapter_ts), `TS`, `TSSetComputeInitialCondition()`, `TSComputeInitialCondition()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/interface/ts.c.html#TSGetComputeInitialCondition">src/ts/interface/ts.c</A>


---
[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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
