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

# TaoSetFromOptions

Sets various Tao parameters from user options.

### Synopsis

    #include "petsctao.h"
    PetscErrorCode TaoSetFromOptions(Tao tao)

Collective on Tao Many br

### Input Paremeter

tao -the Tao solver context Many br

### options Database Keys

| -tao_type <type> | - The algorithm that TAO uses (lmvm, nls, etc.) Many br
| -tao_gatol <gatol> | - absolute error tolerance for ||gradient|| Many br
| -tao_grtol <grtol> | - relative error tolerance for ||gradient|| Many br
| -tao_gttol <gttol> | - reduction of ||gradient|| relative to initial gradient Many br
| -tao_max_it <max> | - sets maximum number of iterations Many br
| -tao_max_funcs <max> | - sets maximum number of function evaluations Many br
| -tao_fmin <fmin> | - stop if function value reaches fmin Many br
| -tao_steptol <tol> | - stop if trust region radius less than <tol> Many br
| -tao_trust0 <t> | - initial trust region radius Many br
| -tao_monitor | - prints function value and residual at each iteration Many br
| -tao_smonitor | - same as tao_monitor, but truncates very small values Many br
| -tao_cmonitor | - prints function value, residual, and constraint norm at each iteration Many br
| -tao_view_solution | - prints solution vector at each iteration Many br
| -tao_view_separableobjective | - prints separable objective vector at each iteration Many br
| -tao_view_step | - prints step direction vector at each iteration Many br
| -tao_view_gradient | - prints gradient vector at each iteration Many br
| -tao_draw_solution | - graphically view solution vector at each iteration Many br
| -tao_draw_step | - graphically view step vector at each iteration Many br
| -tao_draw_gradient | - graphically view gradient at each iteration Many br
| -tao_fd_gradient | - use gradient computed with finite differences Many br
| -tao_cancelmonitors | - cancels all monitors (except those set with command line) Many br
| -tao_view | - prints information about the Tao after solving Many br
| -tao_converged_reason | - prints the reason TAO stopped iterating Many br

### Notes

To see all options, run your program with the -help option or consult the Many bruser's manual. Should be called after TaoCreate() but before TaoSolve() Many br

Many br

Level:beginner
Location:src/tao/interface/taosolver.c
Index of all Tao routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ts/examples/tutorials/ex16opt_p.c.html
src/ts/examples/tutorials/ex16opt_ic.c.html
src/ts/examples/tutorials/ex20opt_p.c.html
src/ts/examples/tutorials/ex20opt_ic.c.html
src/tao/unconstrained/examples/tutorials/eptorsion1.c.html
src/tao/unconstrained/examples/tutorials/eptorsion2.c.html
src/tao/unconstrained/examples/tutorials/minsurf2.c.html
src/tao/unconstrained/examples/tutorials/rosenbrock1.c.html
src/tao/unconstrained/examples/tutorials/eptorsion2f.F.html
src/tao/unconstrained/examples/tutorials/rosenbrock1f.F.html
src/tao/constrained/examples/tutorials/maros.c.html