[petsc-users] Support for full jacobianP in TSSetIJacobianP

Salazar De Troya, Miguel salazardetro1 at llnl.gov
Fri Dec 18 10:58:14 CST 2020

Yes, that is the case I am considering. The special case I am concerned about is as following: the heat equation in variational form and in firedrake/UFL notation is as follows: p*u_t*v*dx + inner(grad(u), grad(v))*dx = 0, where u is the temperature, u_t is its time derivative, v is just the test function, dx is the integration domain and p is the design parameter. If “p” were discontinuous, one can’t just factor “p” into the second term due to the divergence theorem. Meaning that p*u_t*v*dx + inner(grad(u), grad(v))*dx = 0 is different than u_t*v*dx + inner(1.0 / p * grad(u), grad(v))*dx = 0, which is what ideally one would obtain in order to adapt to the current interface in TSAdjoint.


From: "Zhang, Hong" <hongzhang at anl.gov>
Date: Thursday, December 17, 2020 at 7:25 PM
To: "Salazar De Troya, Miguel" <salazardetro1 at llnl.gov>
Cc: Satish Balay via petsc-users <petsc-users at mcs.anl.gov>
Subject: Re: [petsc-users] Support for full jacobianP in TSSetIJacobianP

Hi Miguel,

Thank you for the nice work. I do not understand what you propose to do here. What is the obstacle to using current TSSetIJacobianP() for the corner case you mentioned? Are you considering a case in which the mass matrix is parameterized, e.g. M(p) udot - f(t,u) = g(t,u) ?


On Dec 17, 2020, at 3:38 PM, Salazar De Troya, Miguel via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:


I am working on hooking up TSAdjoint with pyadjoint through the firedrake-ts interface (https://github.com/IvanYashchuk/firedrake-ts). I have done most of the implementation and now I am just testing for corner cases. One of them is when the design variable is multiplying the first derivative term. It would be the case ofF(Udot,U,P,t) = G(U,P,t) in https://www.mcs.anl.gov/petsc/petsc-master/docs/manualpages/Sensitivity/TSSetIJacobianP.html . I imagine that one could think of refactoring the “P” in the left hand side to the right hand side, but this is not trivial when “P” is a discontinuous field over the domain. I think it would be better to include the case of F(Udot,U,P,t) = G(U,P,t) in TSSetIJacobianP and I am volunteering to do it. Given the current implementation of TSAdjoint, is this something feasible?


Miguel A. Salazar de Troya
Postdoctoral Researcher, Lawrence Livermore National Laboratory
Rm: 1085-5
Ph: 1(925) 422-6411

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20201218/739094d1/attachment-0001.html>

More information about the petsc-users mailing list