# TSForwardCostIntegral
Evaluate the cost integral in the forward run. 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSForwardCostIntegral(TS ts)
```
Collective


## Input Parameter

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





## Note
This function cannot be called until `TSStep()` has been completed.


## See Also
 [](chapter_ts), `TS`, `TSSolve()`, `TSAdjointCostIntegral()`

## Level
advanced

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/explicit/rk/rk.c.html#TSForwardCostIntegral_RK">TSForwardCostIntegral_RK in src/ts/impls/explicit/rk/rk.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/implicit/theta/theta.c.html#TSForwardCostIntegral_Theta">TSForwardCostIntegral_Theta in src/ts/impls/implicit/theta/theta.c</A><BR>


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