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


## Input Parameter
.  ts - time stepping context




## Notes
This function cannot be called until `TSAdjointStep()` has been completed.

.seealso: [](chapter_ts), `TSAdjointSolve()`, `TSAdjointStep()`

## Level
advanced

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/explicit/rk/rk.c.html#TSAdjointCostIntegral_RK">TSAdjointCostIntegral_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#TSAdjointCostIntegral_Theta">TSAdjointCostIntegral_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)  
