# TSAdaptCheckStage
checks whether to accept a stage, (e.g. reject and change time step size if nonlinear solve fails or solution vector is infeasible) 
## Synopsis
```
#include "petscts.h" 
PetscErrorCode TSAdaptCheckStage(TSAdapt adapt, TS ts, PetscReal t, Vec Y, PetscBool *accept)
```
Collective


## Input Parameters

- ***adapt -*** adaptive controller context
- ***ts -*** time stepper
- ***t -*** Current simulation time
- ***Y -*** Current solution vector



## Output Parameter

- ***accept -*** `PETSC_TRUE` to accept the stage, `PETSC_FALSE` to reject





## See Also
 [](chapter_ts), `TSAdapt`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/adapt/interface/tsadapt.c.html#TSAdaptCheckStage">src/ts/adapt/interface/tsadapt.c</A>


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