# TSAdaptChoose
choose which method and step size to use for the next step 
## Synopsis
```
#include "petscts.h" 
PetscErrorCode TSAdaptChoose(TSAdapt adapt, TS ts, PetscReal h, PetscInt *next_sc, PetscReal *next_h, PetscBool *accept)
```
Collective on adapt


## Input Parameters

- ***adapt -*** adaptive contoller
- ***ts -*** time stepper
- ***h -*** current step size



## Output Parameters

- ***next_sc -*** optional, scheme to use for the next step
- ***next_h -*** step size to use for the next step
- ***accept -*** `PETSC_TRUE` to accept the current step, `PETSC_FALSE` to repeat the current step with the new step size





## Note
The input value of parameter accept is retained from the last time step, so it will be `PETSC_FALSE` if the step is
being retried after an initial rejection.


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

## Level
developer

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/adapt/impls/basic/adaptbasic.c.html#TSAdaptChoose_Basic">TSAdaptChoose_Basic in src/ts/adapt/impls/basic/adaptbasic.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/adapt/impls/cfl/adaptcfl.c.html#TSAdaptChoose_CFL">TSAdaptChoose_CFL in src/ts/adapt/impls/cfl/adaptcfl.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/adapt/impls/dsp/adaptdsp.c.html#TSAdaptChoose_DSP">TSAdaptChoose_DSP in src/ts/adapt/impls/dsp/adaptdsp.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/adapt/impls/glee/adaptglee.c.html#TSAdaptChoose_GLEE">TSAdaptChoose_GLEE in src/ts/adapt/impls/glee/adaptglee.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/adapt/impls/history/adapthist.c.html#TSAdaptChoose_History">TSAdaptChoose_History in src/ts/adapt/impls/history/adapthist.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/adapt/impls/none/adaptnone.c.html#TSAdaptChoose_None">TSAdaptChoose_None in src/ts/adapt/impls/none/adaptnone.c</A><BR>


---
[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)  
