[petsc-users] TSAdjointSolve using MatShell for RHSJacobianP

Guenther, Stefanie guenther5 at llnl.gov
Thu Apr 9 19:26:52 CDT 2026


Hi,

I want to use the TS adjoint solve to backpropagate gradients within a linear ODE of the form \dot u(t)= A(p,t)u(t). I want to use a MatShell for the RHSJacobianP function, representing the rectangular matrix dA(p,t)/dp * u. However, I only have the MatMultTranspose function available for this, not a MatMult. Is the MatMult strictly required for this shell? As far as I know, the back propagation should only be using the MatMultTranspose anyways, to apply (dRHS/dp)^T  * ubar, so I would think it should work without the MatMult, is that correct?

Thank you very much!
Stefanie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20260410/3bf5c094/attachment.html>


More information about the petsc-users mailing list