SNESLineSearchSetTolerances — PETSc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# SNESLineSearchSetTolerances

Sets the tolerances for the linesearch.

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESLineSearchSetTolerances(SNESLineSearch linesearch, PetscReal minlambda, PetscReal maxlambda, PetscReal rtol, PetscReal atol, PetscReal ltol, PetscInt max_it)

Collective

## Input Parameters

- linesearch - the line search context

- minlambda - The minimum `lambda` allowed

- maxlambda - The maximum `lambda` allowed

- rtol - The relative tolerance for iterative line searches

- atol - The absolute tolerance for iterative line searches

- ltol - The change in `lambda` tolerance for iterative line searches

- max_it - The maximum number of iterations of the line search

## Options Database Keys

- -snes_linesearch_minlambda - The minimum `lambda` allowed

- -snes_linesearch_maxlambda - The maximum `lambda` allowed

- -snes_linesearch_rtol - Relative tolerance for iterative line searches

- -snes_linesearch_atol - Absolute tolerance for iterative line searches

- -snes_linesearch_ltol - Change in `lambda` tolerance for iterative line searches

- -snes_linesearch_max_it - The number of iterations for iterative line searches

## Note

The user may choose to not set any of the tolerances using `PETSC_DEFAULT` in place of an argument.

## See Also

SNES: Nonlinear Solvers, `SNES`, `SNESLineSearch`, `SNESLineSearchGetTolerances()`

## Level

intermediate

## Location

src/snes/linesearch/interface/linesearch.c

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