:orphan:
# TSMonitor
Runs all user-provided monitor routines set using `TSMonitorSet()` 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSMonitor(TS ts, PetscInt step, PetscReal ptime, Vec u)
```
Collective


## Input Parameters

- ***ts -*** time stepping context obtained from `TSCreate()`
- ***step -*** step number that has just completed
- ***ptime -*** model time of the state
- ***u -*** state at the current model time





## Notes
`TSMonitor()` is typically used automatically within the time stepping implementations.
Users would almost never call this routine directly.

A step of -1 indicates that the monitor is being called on a solution obtained by interpolating from computed solutions


## See Also
 `TS`, `TSMonitorSet()`, `TSMonitorSetFromOptions()`

## Level
developer

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ts/interface/tsmon.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)  
