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

# TSSetFromOptions

Sets various TS parameters from user options.

### Synopsis

    #include "petscts.h"
    PetscErrorCode  TSSetFromOptions(TS ts)

Collective on TS Many br

### Input Parameter

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

### Options Database Keys

| -ts_type <type> | - TSEULER, TSBEULER, TSSUNDIALS, TSPSEUDO, TSCN, TSRK, TSTHETA, TSALPHA, TSGL, TSSSP Many br
| -ts_save_trajectory | - checkpoint the solution at each time-step Many br
| -ts_max_steps <maxsteps> | - maximum number of time-steps to take Many br
| -ts_final_time <time> | - maximum time to compute to Many br
| -ts_dt <dt> | - initial time step Many br
| -ts_exact_final_time <stepover,interpolate,matchstep> whether to stop at the exact given final time and how to compute the solution at that ti,e | - . -ts_max_snes_failures <maxfailures> - Maximum number of nonlinear solve failures allowed Many br
| -ts_max_reject <maxrejects> | - Maximum number of step rejections before step fails Many br
| -ts_error_if_step_fails <true,false> | - Error if no step succeeds Many br
| -ts_rtol <rtol> | - relative tolerance for local truncation error Many br
| -ts_atol <atol> Absolute tolerance for local truncation error | - . -ts_adjoint_solve <yes,no> After solving the ODE/DAE solve the adjoint problem (requires -ts_save_trajectory) Many br
| -ts_fd_color | - Use finite differences with coloring to compute IJacobian Many br
| -ts_monitor | - print information at each timestep Many br
| -ts_monitor_lg_solution | - Monitor solution graphically Many br
| -ts_monitor_lg_error | - Monitor error graphically Many br
| -ts_monitor_lg_timestep | - Monitor timestep size graphically Many br
| -ts_monitor_lg_snes_iterations | - Monitor number nonlinear iterations for each timestep graphically Many br
| -ts_monitor_lg_ksp_iterations | - Monitor number nonlinear iterations for each timestep graphically Many br
| -ts_monitor_sp_eig | - Monitor eigenvalues of linearized operator graphically Many br
| -ts_monitor_draw_solution | - Monitor solution graphically Many br
| -ts_monitor_draw_solution_phase <xleft,yleft,xright,yright> | - Monitor solution graphically with phase diagram, requires problem with exactly 2 degrees of freedom Many br
| -ts_monitor_draw_error | - Monitor error graphically, requires use to have provided TSSetSolutionFunction() Many br
| -ts_monitor_solution [ascii binary draw][:filename][:viewerformat] | - monitors the solution at each timestep Many br
| -ts_monitor_solution_vtk <filename.vts> | - Save each time step to a binary file, use filename-%%03D.vts Many br
| -ts_monitor_envelope | - determine maximum and minimum value of each component of the solution over the solution time Many br
| -ts_adjoint_monitor | - print information at each adjoint time step Many br
| -ts_adjoint_monitor_draw_sensi | - monitor the sensitivity of the first cost function wrt initial conditions (lambda[0]) graphically Many br

Developer Note: We should unify all the -ts_monitor options in the way that -xxx_view has been unified Many br

Many br

### Keywords

TS, timestep, set, options, database

### See Also

TSGetType()

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/ex1.c.html
src/ts/examples/tutorials/ex2.c.html
src/ts/examples/tutorials/ex3.c.html
src/ts/examples/tutorials/ex4.c.html
src/ts/examples/tutorials/ex5.c.html
src/ts/examples/tutorials/ex6.c.html
src/ts/examples/tutorials/ex7.c.html
src/ts/examples/tutorials/ex8.c.html
src/ts/examples/tutorials/ex9.c.html
src/ts/examples/tutorials/ex10.c.html
src/ts/examples/tutorials/ex11.c.html