SNESNewtonTRSetUpdateParameters — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# SNESNewtonTRSetUpdateParameters

Sets the trust region update parameters.

## Synopsis

    #include "petscsnes.h"
    PetscErrorCode SNESNewtonTRSetUpdateParameters(SNES snes, PetscReal eta1, PetscReal eta2, PetscReal eta3, PetscReal t1, PetscReal t2)

Logically Collective

## Input Parameters

- snes - the `SNES` context

- eta1 - acceptance tolerance

- eta2 - shrinking tolerance

- eta3 - enlarging tolerance

- t1 - shrink factor

- t2 - enlarge factor

## Options Database Key

- -snes_tr_eta1 - Set eta1

- -snes_tr_eta2 - Set eta2

- -snes_tr_eta3 - Set eta3

- -snes_tr_t1 - Set t1

- -snes_tr_t2 - Set t2

## Notes

Given the ratio \(\rho = \frac{f(x_k) - f(x_k+s_k)}{m(0) - m(s_k)}\), with \(x_k\) the current iterate, \(s_k\) the computed step, \(f\) the objective function, and \(m\) the quadratic model, the trust region radius is modified as follows $\( \delta = \begin{cases} \delta * t_1 ,& \rho < \eta_2 \\ \delta * t_2 ,& \rho > \eta_3 \\ \end{cases} \)\( The step is accepted if \)\rho > \eta_1$. Use `PETSC_DETERMINE` to use the default value for the given `SNES`. Use `PETSC_CURRENT` to retain a value.

## Fortran Note

Use `PETSC_DETERMINE_REAL`, `PETSC_CURRENT_REAL`

## See Also

SNES: Nonlinear Solvers, `SNES`, `SNESNEWTONTR`, `SNESSetObjective()`, `SNESNewtonTRGetUpdateParameters()`

## Level

intermediate

## Location

src/snes/impls/tr/tr.c

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