Navigation

Operators and Keywords

Function List:

C++ API

Function File: [s, t] = so_step_armijo (t0, d, f, dJ, data)

Perform a line search according to the Armijo rule. A backtracking strategy is employed, such that the returned step length t satisfies

J(t) <= J(0) + t * tau * dJ.

t0 defines the initial step length (see below). It can be set to some suitable constant or to the last successful step length. d should be the result of ls_solve_stationary for the current geometry, and f the matching speed field on the grid. dJ must be the directional shape derivative of the cost functional in direction f. This value must be negative.

Data defining the problem, the current state and parameters should be passed in data. See so_run_descent for a description of this struct.

Returned is the final state struct in s and the corresponding step length taken in t.

The following parameters must be set in data.p.lineSearch to determine how the Armijo line search is done:

relaxation

The parameter tau in the Armijo rule.

backtrack

Backtracking factor. Should be less than one.

initial

Factor for increasing t0 to get the initial guess. This should be larger than one in order to allow increasing of the step length when this is possible.

minStep

Minimum step length. If backtracking goes below this value, use minStep and disregard the condition.

Furthermore, the following general parameters in data.p also influence the behaviour of the line search:

verbose

Whether or not log chatter should be printed.

nProc

Number of parallel threads to use for the line search. If this is larger than one, multiple trial steps are computed in parallel to speed up the computation. For this to work, pararrayfun of the parallel package must be available.

The routine so_init_params can be used to initialise the parameter structure with default values.

See also: so_init_params, so_run_descent, ls_solve_stationary.

Package: level-set