#include "tao_solver.h"
int TaoSetLineSearch(TAO_SOLVER tao,
int (*setup)(TAO_SOLVER,void*),
int (*options)(TAO_SOLVER,void*),
int (*line)(TAO_SOLVER,TaoVec*,TaoVec*,TaoVec*,TaoVec*,
double*,double*,double*,TaoInt*,void*),
int (*viewit)(TAO_SOLVER,void*),
int (*destroy)(TAO_SOLVER,void*),
void *ctx)
Collective on TAO_SOLVER
| tao | - the TAO_SOLVER solver context | |
| setup | - setup routine (or TAO_NULL) | |
| options | - set line search options (or TAO_NULL) | |
| line | - the line search routine | |
| viewit | - routine that views the linesearch (or TAO_NULL) | |
| destroy | - destroys the user defined routine when the solver is destroyed (or TAO_NULL) | |
| ctx | - linesearch structure (or TAO_NULL) |
line(TAO_SOLVER tao, TaoVec* X, TaoVec* G, TaoVec* DX, TaoVec* Work, double *f,double *step, int *flag, void *ctx)
| tao | - the TAO_SOLVER solver context | |
| xx | - current solution | |
| gg | - current gradient | |
| dxdx | - step direction | |
| Work | - work vector | |
| f | - function value | |
| step | - initial stepsize | |
| ctx | - user-defined line search context |
| X | - new solution | |
| G | - new gradient | |
| f | - new function value | |
| step | - multiple of DX added to the previous solution | |
| flag | - indicator of success or failure (flag=0 is a success, flag=7 means DX is not a descent direction) |
To ensure descent in a projected line search, the input parameter gdx should be the inner product of the gradient and the first linear manifold being searched.
Level:advanced
Location:src/interface/line.c
TAO Solver Index
Table of Contents