petsc-3.6.2 2015-10-02
Report Typos and Errors

# TaoSetTolerances

Sets parameters used in TAO convergence tests

### Synopsis

    #include "petsctao.h"
    PetscErrorCode TaoSetTolerances(Tao tao, PetscReal fatol, PetscReal frtol, PetscReal gatol, PetscReal grtol, PetscReal gttol)

Logically collective on Tao

### Input Parameters

| tao | - the Tao context
| fatol | - absolute convergence tolerance
| frtol | - relative convergence tolerance
| gatol | - stop if norm of gradient is less than this
| grtol | - stop if relative norm of gradient is less than this
| gttol | - stop if norm of gradient is reduced by this factor

### Options Database Keys

| -tao_fatol <fatol> | - Sets fatol
| -tao_frtol <frtol> | - Sets frtol
| -tao_gatol <gatol> | - Sets gatol
| -tao_grtol <grtol> | - Sets grtol
| -tao_gttol <gttol> | - Sets gttol

### Stopping Criteria

    f(X) - f(X*) (estimated)            <= fatol

    |f(X) - f(X*)| (estimated) / |f(X)| <= frtol

    ||g(X)||                            <= gatol

    ||g(X)|| / |f(X)|                   <= grtol

    ||g(X)|| / ||g(X0)||                <= gttol

### Notes

Use PETSC_DEFAULT to leave one or more tolerances unchanged.

### See Also

TaoGetTolerances()

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/constrained/examples/tutorials/maros.c.html
src/tao/constrained/examples/tutorials/toy.c.html
src/tao/constrained/examples/tutorials/toyf.F.html