<div dir="ltr">Jed,<div><br></div><div>have you thought about how to fix this?</div><div><br></div><div><a href="https://lists.mcs.anl.gov/pipermail/petsc-dev/2017-October/021387.html">https://lists.mcs.anl.gov/pipermail/petsc-dev/2017-October/021387.html</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-10-16 11:26 GMT+03:00 Stefano Zampini <span dir="ltr"><<a href="mailto:stefano.zampini@gmail.com" target="_blank">stefano.zampini@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_-3280239144913885436gmail-"><br>
<br>
</span>Yeah, but they are sparse quadratures. That's sort of how Stefano has<br>
implemented it, though the concept should be generalized and<br>
fixtime=PETSC_MIN_REAL is not a nice way to denote an integral.<br>
<span class="m_-3280239144913885436gmail-"><br></span></blockquote><div><br></div></span><div>My quadrature implementation is very primitive: it is just function sampling and trapezoidal rule.</div><div>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.</div><span class=""><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_-3280239144913885436gmail-">
>> Both methods need the Jacobian of the DAE wrt the parameters: H<br>
>> TSAdjointSetRHSJacobian(), S TSSetGradientDAE()<br>
>><br>
><br>
> Here I understand Stefano to be using DAE in the following sense: Suppose<br>
> my continuous problem is a Partial Differential-Algebraic Equation (PDAE).<br>
> Then after discretizing in space, which I would call Method of Lines, I am<br>
> left with a Differential-Algebraic Equation (DAE) in time.<br>
<br>
</span>Yeah, but the method isn't very useful in that context. Fortunately,<br>
TSCreateAdjointTS() is an interface that makes it easy to replace the<br>
adjoint of the spatially-discretized operator with the discretization of<br>
the adjoint (i.e., call TSSetComputeRHSJacobian(tsadj, ...)).<br></blockquote><div><br></div></span><div>Wait, you are mixing two "Jacobians here", and this is why I prefer to call gradient one of them</div><div>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(<wbr>tsadj, aJ...)). is for the adjoint DAE, i.e. Ldot = L^T * aJ</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><div class="m_-3280239144913885436gmail_signature">Stefano</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Stefano</div>
</div>