simpeg.optimization.ProjectedGNCG.modifySearchDirectionBreak#

ProjectedGNCG.modifySearchDirectionBreak(p)[source]#

Called if modifySearchDirection fails to find a descent direction.

The search direction is passed as input and this function must pass back both a new searchDirection, and if the searchDirection break has been caught.

By default, no additional work is done, and the evalFunction returns a False indicating the break was not caught.

Parameters:
pnumpy.ndarray

The failed search direction.

Returns:
xtnumpy.ndarray

An alternative search direction to use.

was_caughtbool

Whether the break was caught. The minimization algorithm will break early if not was_caught.