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

2020-03-14 Thread Zhang, Hong via petsc-users
On Mar 12, 2020, at 8:31 PM, Sajid Ali mailto:sajidsyed2...@u.northwestern.edu>> wrote: Hi Hong, For the optimal control example, the cost function has an integral term which necessitates the setup of a sub-TS quadrature. The Jacobian with respect to parameter, (henceforth denoted by

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

2020-03-12 Thread Sajid Ali
Hi Hong, For the optimal control example, the cost function has an integral term which necessitates the setup of a sub-TS quadrature. The Jacobian with respect to parameter, (henceforth denoted by Jacp) has dimensions that depend upon the number of steps that the TS integrates for. I'm trying to

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

2020-02-25 Thread Zhang, Hong via petsc-users
On Feb 25, 2020, at 11:21 AM, Sajid Ali mailto:sajidsyed2...@u.northwestern.edu>> wrote: Hi Hong, Thanks for the explanation! If I have a cost function consisting of an L2 norm of the difference of a TS-solution and some reference along with some constraints (say bounds, L1-sparsity,

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

2020-02-25 Thread Matthew Knepley
On Tue, Feb 25, 2020 at 12:23 PM Sajid Ali wrote: > Hi Hong, > > Thanks for the explanation! > > If I have a cost function consisting of an L2 norm of the difference of a > TS-solution and some reference along with some constraints (say bounds, > L1-sparsity, total variation etc), would I

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

2020-02-25 Thread Sajid Ali
Hi Hong, Thanks for the explanation! If I have a cost function consisting of an L2 norm of the difference of a TS-solution and some reference along with some constraints (say bounds, L1-sparsity, total variation etc), would I provide a routine for gradient evaluation of only the L2 norm (where

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

2020-02-25 Thread Zhang, Hong via petsc-users
On Feb 25, 2020, at 10:37 AM, Sajid Ali mailto:sajidsyed2...@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