11. TAO Solvers

The primary commands for solving an unconstrained optimization problem using TAO are shown in Figure .


   TaoCreate(MPI_Comm comm, TaoMethod method, TAO_SOLVER *tao);  
   TaoApplicationCreate(MPI_Comm comm, TAO_APPLICATION *taoapp);  
   TaoSetInitialSolutionVec(TAO_APPLICATION taoapp, Vec x); 
   TaoSetObjectiveAndGradientRoutine(TAO_APPLICATION taoapp, 
            int (*FormFGradient)(TAO_APPLICATION,Vec,double,Vec,void*),void *user); 
   TaoSetHessianMat(TAO_APPLICATION taoapp, Mat H, Mat Hpre); 
   TaoSetHessianRoutine(TAO_APPLICATION taoapp, 
            int (*Hessian)(TAO_APPLICATION, Vec, Mat*, Mat*, MatStructure*, void*),(void *)&user); 
   TaoSolveApplication(TAO_APPLICATION taoapp, TAO_SOLVER tao); 
   TaoApplicationDestroy(TAO_APPLICATION taoapp); 
   TaoDestroy(TAO_SOLVER tao); 

Figure 4: Commands for solving an unconstrained optimization problem

The user first creates the TAO_SOLVER and TAO_APPLICATION contexts. He then sets call-back routines as well as vector ( Vec) and matrix ( Mat) data structures that the TAO solver will use for evaluating the minimization function, gradient, and optionally the Hessian matrix. The user then solves the minimization problem, and finally destroys the TAO_SOLVER and TAO_APPLICATION contexts. Details of these commands are presented in Chapter .

Note that TaoCreate() enables the user to select the solution method at runtime by using an options database. Through this database, the user not only can select a minimization method (e.g., limited-memory variable metric, conjugate gradient, Newton with line search or trust region), but also can prescribe the convergence tolerance, set various monitoring routines, indicate techniques for linear systems solves, etc. See Chapter for more information on the solver methods available in TAO.