# TSPseudoSetVerifyTimeStep
Sets a user-defined routine to verify the quality of the last timestep. 
## Synopsis
```
#include "petscts.h"   
PetscErrorCode TSPseudoSetVerifyTimeStep(TS ts, PetscErrorCode (*dt)(TS, Vec, void *, PetscReal *, PetscBool *), void *ctx)
```
Logically Collective on ts


## Input Parameters

- ***ts -*** timestep context
- ***dt -*** user-defined function to verify timestep
- ***ctx -*** [optional] user-defined context for private data
for the timestep verification routine (may be NULL)



## Calling sequence of func
```none
func (TS ts,Vec update,void *ctx,PetscReal *newdt,PetscBool  *flag);
```


- ***update -*** latest solution vector
- ***ctx -*** [optional] timestep context
- ***newdt -*** the timestep to use for the next step
- ***flag -*** flag indicating whether the last time step was acceptable





## Note
The routine set here will be called by `TSPseudoVerifyTimeStep()`
during the timestepping process.


## See Also
 [](chapter_ts), `TSPSEUDO`, `TSPseudoVerifyTimeStepDefault()`, `TSPseudoVerifyTimeStep()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/pseudo/posindep.c.html#TSPseudoSetVerifyTimeStep">src/ts/impls/pseudo/posindep.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/impls/pseudo/posindep.c.html#TSPseudoSetVerifyTimeStep_Pseudo">TSPseudoSetVerifyTimeStep_Pseudo in src/ts/impls/pseudo/posindep.c</A><BR>


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