tao-2.1-p0 2012-07-24

TaoSetJacobianDesignRoutine

Sets the function to compute the Jacobian of the constraint function with respect to the design variables. Used only for pde-constrained optimization.

Synopsis

#include "taosolver.h" 
PetscErrorCode TaoSetJacobianDesignRoutine(TaoSolver tao, Mat J, PetscErrorCode (*func)(TaoSolver, Vec, Mat*, void*), void *ctx)
Logically collective on TaoSolver

Input Parameters

tao - the TaoSolver context
J - Matrix used for the jacobian
jac - Jacobian evaluation routine
ctx - [optional] user-defined context for private data for the Jacobian evaluation routine (may be PETSC_NULL)

Calling sequence of jac

   jac (TaoSolver tao,Vec x,Mat *J,void *ctx);

tao - the TaoSolver context
x - input vector
J - Jacobian matrix
ctx - [optional] user-defined Jacobian context

Notes

The function jac() takes Mat * as the matrix arguments rather than Mat. This allows the Jacobian evaluation routine to replace A and/or B with a completely new new matrix structure (not just different matrix elements) when appropriate, for instance, if the nonzero structure is changing throughout the global iterations.

See Also

TaoComputeJacobianDesign(), TaoSetJacobianStateRoutine(), TaoSetStateDesignIS()

Level:intermediate
Location:src/interface/taosolver_hj.c
TAO Solver Index
Table of Contents

Examples

src/pde_constrained/examples/tutorials/elliptic.c.html
src/pde_constrained/examples/tutorials/parabolic.c.html
src/pde_constrained/examples/tutorials/hyperbolic.c.html