TSPSEUDO — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# TSPSEUDO

Solve steady state ODE and DAE problems with pseudo time stepping [CKK02] [KK98] This method solves equations of the form

\[ F(X,Xdot) = 0 \]

for steady state using the iteration

\[ [G'] S = -F(X,0) X += S \]

where

\[ G(Y) = F(Y,(Y-X)/dt) \]

This is linearly-implicit Euler with the residual always evaluated “at steady state”. See note below.

In addition to the modified solve, a dedicated adaptive timestepping scheme is implemented, mimicking the switched evolution relaxation in [CKK02]. It determines the next timestep via

\[ dt_{n} = r dt_{n-1} \frac{\Vert F(X_{n},0) \Vert}{\Vert F(X_{n-1},0) \Vert} \]

where \(r\) is an additional growth factor (set by `-ts_pseudo_increment`). An alternative formulation is also available that uses the initial timestep and function norm.

\[ dt_{n} = r dt_{0} \frac{\Vert F(X_{n},0) \Vert}{\Vert F(X_{0},0) \Vert} \]

This is chosen by setting `-ts_pseudo_increment_dt_from_initial_dt`. For either method, an upper limit on the timestep can be set by `-ts_pseudo_max_dt`.

## Options Database Keys

- -ts_pseudo_increment real - ratio of increase dt

- -ts_pseudo_increment_dt_from_initial_dt (true|false) - Increase dt as a ratio from original dt

- -ts_pseudo_max_dt - Maximum `dt` for adaptive timestepping algorithm

- -ts_pseudo_monitor - Monitor convergence of the function norm

- -ts_pseudo_fatol atol - stop iterating when the function norm is less than `atol`

- -ts_pseudo_frtol rtol - stop iterating when the function norm divided by the initial function norm is less than `rtol`

## Notes

The residual computed by this method includes the transient term (Xdot is computed instead of always being zero), but since the prediction from the last step is always the solution from the last step, on the first Newton iteration we have

\[ Xdot = (Xpredicted - Xold)/dt = (Xold-Xold)/dt = 0 \]

The Jacobian \( dF/dX + shift*dF/dXdot \) contains a non-zero \( dF/dXdot\) term. In the \( X' = F(X) \) case it is \( dF/dX + shift*1/dt \). Hence still contains the \( 1/dt \) term so the Jacobian is not simply the Jacobian of \( F \) and thus this pseudo-transient continuation is not just Newton on \(F(x)=0\).

Therefore, the linear system solved by the first Newton iteration is equivalent to the one described above and in the papers. If the user chooses to perform multiple Newton iterations, the algorithm is no longer the one described in the referenced papers. By default, the `SNESType` is set to `SNESKSPONLY` to match the algorithm from the referenced papers. Setting the `SNESType` via `-snes_type` will override this default setting.

## References

[CKK02] (1,2)

Todd S. Coffey, C. T. Kelley, and David E. Keyes. Pseudo-transient continuation and differential-algebraic equations. Technical Report, ODU, 2002. Submitted to the special issue of the SIAM Journal of Scientific Computing dedicated to papers from the 2002 Copper Mountain Conference on Iterative Methods. URL: http://www.math.odu.edu/\~{ }keyes.

[KK98]

Carl T. Kelley and David E. Keyes. Convergence analysis of pseudo-transient continuation. SIAM J. Numerical Analysis, 35:508–523, 1998.

## See Also

TS: Scalable ODE and DAE Solvers, `TSCreate()`, `TS`, `TSSetType()`

## Level

beginner

## Location

src/ts/impls/pseudo/posindep.c

## Examples

src/ts/tutorials/ex1.c
src/ts/tutorials/ex42.c
src/ts/tutorials/ex24.c
src/ts/tutorials/ex1f.F90

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