[petsc-users] Questions about TSAdjoint for time dependent parameters

Zhang, Hong hongzhang at anl.gov
Tue Feb 25 10:59:43 CST 2020



On Feb 25, 2020, at 10:37 AM, Sajid Ali <sajidsyed2021 at u.northwestern.edu<mailto:sajidsyed2021 at u.northwestern.edu>> wrote:

Hi PETSc-developers,

Could the code used for section 5.1 of the recent paper "PETSc TSAdjoint: a discrete adjoint ODE solver for first-order and second-order sensitivity analysis" be shared ? Are there more examples that deal with time dependent parameters in the git repository ?

The code is in the master branch. See ts/examples/tutorials/optimal_control/ex1.c. This is the only example that deals with time-varying parameters.


Another question I have is regarding the equations used to introduce adjoints in section 7.1 of the manual where for the state of the solution vector is denoted by y and the parameters by p.

[1] I'm unsure about what the partial derivative of y0 with respect to p means since I understand y0 to be the initial conditions used to solve the TS which would not depend on the parameters (since the parameters are related to the equations TS tries to solve for which should not dependent on the initialization used). Could someone clarify what this means ?

 There exist applications that initial condition depends on the design parameters.


[2] The manual described that a user has to set the correct initialization for the adjoint variables when calling TSSetCostGradients. The initialization for mu vector is whereby given to be dΦi/dp at t=tF. If p is time dependent, does one evaluate this derivative with respect to p(t) at t=tF ?

Yes

The adjoint solvers are designed to handle as many cases as possible. In your case, you may have simpler dependencies than those supported. If the initial condition and the objective function do not depend on the parameters directly, their partial derivatives wrt to p will be zero and you can simply ignore them.

Hong (Mr.)


Thank You,
Sajid Ali | PhD Candidate
Applied Physics
Northwestern University
s-sajid-ali.github.io<http://s-sajid-ali.github.io/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200225/4abf9f2a/attachment.html>


More information about the petsc-users mailing list