[petsc-dev] Discussion about time-dependent optimization moved from PR

Stefano Zampini stefano.zampini at gmail.com
Mon Oct 16 03:26:31 CDT 2017


>
>
> Yeah, but they are sparse quadratures.  That's sort of how Stefano has
> implemented it, though the concept should be generalized and
> fixtime=PETSC_MIN_REAL is not a nice way to denote an integral.
>
>
My quadrature implementation is very primitive: it is just function
sampling and trapezoidal rule.
Having fixtime=PETSC_MIN_REAL is just a simple way to have both kind of
objectives under the same API, and I'm open to suggestions.


> >> Both methods need the Jacobian of the DAE wrt the parameters: H
> >> TSAdjointSetRHSJacobian(), S TSSetGradientDAE()
> >>
> >
> > Here I understand Stefano to be using DAE in the following sense: Suppose
> > my continuous problem is a Partial Differential-Algebraic Equation
> (PDAE).
> > Then after discretizing in space, which I would call Method of Lines, I
> am
> > left with a Differential-Algebraic Equation (DAE) in time.
>
> Yeah, but the method isn't very useful in that context.  Fortunately,
> TSCreateAdjointTS() is an interface that makes it easy to replace the
> adjoint of the spatially-discretized operator with the discretization of
> the adjoint (i.e., call TSSetComputeRHSJacobian(tsadj, ...)).
>

Wait, you are mixing two "Jacobians here", and this is why I prefer to call
gradient one of them
The one (let's call it J_m) you set with  TSSetGradientDAE() (and
TSAdjointSetRHSJacobian(), bad name) is needed by the quadrature rule for
\int J_m^T L . The one that instead you can set
via TSSetComputeRHSJacobian(tsadj, aJ...)). is for the adjoint DAE, i.e.
Ldot  = L^T * aJ



-- 
Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20171016/dd8e542c/attachment.html>


More information about the petsc-dev mailing list