TSAlpha2SetPredictor — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# TSAlpha2SetPredictor

sets the callback for computing a predictor (i.e., initial guess for the nonlinear solver).

## Synopsis

    #include "petscts.h"
    PetscErrorCode TSAlpha2SetPredictor(TS ts, TSAlpha2PredictorFn *predictor, void *ctx)

## Input Parameters

- ts - timestepping context

- predictor - callback to set the predictor in each step

- ctx - the application context, which may be set to `NULL` if not used

## Notes

If this function is never called, a same-state-vector predictor will be used, i.e., the initial guess will be the converged solution from the previous time step, without regard for the previous velocity or acceleration.

## See Also

TS: Scalable ODE and DAE Solvers, `TS`, `TSALPHA2`, `TSAlpha2PredictorFn`

## Level

intermediate

## Location

src/ts/impls/implicit/alpha/alpha2.c

## Examples

src/ts/tutorials/ex43.c

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