TaoLineSearchSetType — PETSc 3.25.0 documentation

Skip to main content
`Ctrl`+`K`

# TaoLineSearchSetType

Sets the algorithm used in a line search

## Synopsis

    #include "petsctaolinesearch.h"
    PetscErrorCode TaoLineSearchSetType(TaoLineSearch ls, TaoLineSearchType type)

Collective

## Input Parameters

- ls - the `TaoLineSearch` context

- type - the `TaoLineSearchType` selection

## Options Database Key

- -tao_ls_type type - select which linesearch method Tao should use at runtime, see `TaoLineSearchType`

## See Also

TAO: Optimization Solvers, `Tao`, `TaoLineSearch`, `TaoLineSearchType`, `TaoLineSearchCreate()`, `TaoLineSearchGetType()`, `TaoLineSearchApply()`

## Level

beginner

## Location

src/tao/linesearch/interface/taolinesearch.c

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