Skip to main content
`Ctrl`+`K`

# TSAdaptSetCheckStage

Set a callback to check convergence for a stage

## Synopsis

    #include "petscts.h"
    PetscErrorCode TSAdaptSetCheckStage(TSAdapt adapt, PetscErrorCode (*func)(TSAdapt adapt, TS ts, PetscReal t, Vec Y, PetscBool *accept))

Logically Collective

## Input Parameters

- adapt - adaptive controller context

- func - stage check function

## Calling sequence

- adapt - adaptive controller context

- ts - time stepping context

- t - current time

- Y - current solution vector

- accept - pending choice of whether to accept, can be modified by this routine

## See Also

TS: Scalable ODE and DAE Solvers, Error control via variable time-stepping, `TSAdapt`, `TSGetAdapt()`, `TSAdaptChoose()`

## Level

advanced

## Location

src/ts/adapt/interface/tsadapt.c

Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages