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

Jed Brown jed at jedbrown.org
Mon Oct 16 08:00:37 CDT 2017


Stefano Zampini <stefano.zampini at gmail.com> writes:

>>
>>
>> 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.

Right, so there is a uniform measure and a Dirac delta measure right
now.

>> >> 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", 

No, I mean what I wrote above -- a user solving a PDE for sensitivities
(rather than optimization) will change the adjoint ODE/DAE to use a
consistent discretization of the adjoint.  As we've discussed, the
adjoint of the spatial discretization is generally inconsistent.

> 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


More information about the petsc-dev mailing list