petsc-3.7.1 2016-05-15
Report Typos and Errors

# TSGetSNES

Returns the SNES (nonlinear solver) associated with a TS (timestepper) context. Valid only for nonlinear problems.

### Synopsis

    #include "petscts.h"
    PetscErrorCode  TSGetSNES(TS ts,SNES *snes)

Not Collective, but SNES is parallel if TS is parallel Many br

### Input Parameter

ts -the TS context obtained from TSCreate() Many br

### Output Parameter

snes -the nonlinear solver context Many br

### Notes

The user can then directly manipulate the SNES context to set various Many broptions, etc. Likewise, the user can then extract and manipulate the Many brKSP, KSP, and PC contexts as well. Many br

TSGetSNES() does not work for integrators that do not use SNES; in Many brthis case TSGetSNES() returns NULL in snes. Many br

Many br

### Keywords

timestep, get, SNES

Level:beginner
Location:src/ts/interface/ts.c
Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ts/examples/tutorials/ex4.c.html
src/ts/examples/tutorials/ex7.c.html
src/ts/examples/tutorials/ex10.c.html
src/ts/examples/tutorials/ex12.c.html
src/ts/examples/tutorials/ex14.c.html
src/ts/examples/tutorials/ex15.c.html
src/ts/examples/tutorials/ex17.c.html
src/ts/examples/tutorials/ex22.c.html
src/ts/examples/tutorials/ex24.c.html
src/ts/examples/tutorials/ex22f.F.html