27. TAO Applications using PETSc

The solvers in TAO address applications that have a set of variables, an objective function, and constraints on the variables. Many solvers also require derivatives of the objective and constraint functions. To use the TAO solvers, the application developer must define a set of variables, implement routines that evaluate the objective function and constraint functions, and pass this information to a TAO application object.

TAO uses vector and matrix objects to pass this information from the application to the solver. The set of variables, for instance, is represented in a vector. The gradient of an objective function , evaluated at a point, is also represented as a vector. Matrices, on the other hand, can be used to represent the Hessian of f or the Jacobian of a constraint function . The TAO solvers use these objects to compute a solution to the application.

The PETSc package provides parallel and serial implementations of these objects and offers additional tools intended for high-performance scientific applications. The Vec and Mat types in PETSc represent the vectors and matrices in a TAO application. This chapter will describe how to create these an application object and give it the necessary properties. This chapter will also describe how to use the TAO solvers in conjunction with this application object.