:orphan:
# TSCreateQuadratureTS
Create a sub-`TS` that evaluates integrals over time 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSCreateQuadratureTS(TS ts, PetscBool fwd, TS *quadts)
```

## Input Parameters

- ***ts -*** the `TS` context obtained from `TSCreate()`
- ***fwd -*** flag indicating whether to evaluate cost integral in the forward run or the adjoint run



## Output Parameter

- ***quadts -*** the child `TS` context





## See Also
 [](ch_ts), `TSGetQuadratureTS()`

## Level
intermediate

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/interface/sensitivity/tssen.c)


[Index of all Sensitivity routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
