<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Point-form functionals (i.e., objective functions that are not integrated over time, but just sampled at a given time) drive the initialization of the adjoint variables, and they are not supported explicitly in Hong's code. S: TSSetObjective()</div></div></div></blockquote><div><br></div></span><div>Should these just be handled by a particular quadrature in the cost integral, and by this I mean functionals are specified by quadratures.</div><span class="gmail-"><div></div></span></div></div></div></blockquote><div><br></div><div>Yes, they are evaluated separately in the forward run, see</div><div><br></div><div><a href="https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tspdeconstrainedutils.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tspdeconstrainedutils.c-420">https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tspdeconstrainedutils.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tspdeconstrainedutils.c-420</a><br></div><div><a href="https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tspdeconstrainedutils.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tspdeconstrainedutils.c-486">https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tspdeconstrainedutils.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tspdeconstrainedutils.c-486</a><br></div><div><a href="https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tspdeconstrainedutils.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tspdeconstrainedutils.c-539">https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tspdeconstrainedutils.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tspdeconstrainedutils.c-539</a><br></div><div><a href="https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tspdeconstrainedutils.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tspdeconstrainedutils.c-549">https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tspdeconstrainedutils.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tspdeconstrainedutils.c-549</a><br></div><div><br></div><div>but their gradient wrt the state variables (for first-order adjoints) dictates the initialization of the adjoint variables. More complicated formulas for semi-explicit index-1 DAEs and second order adjoints (needed by the Hessian matvec)</div><div><br></div><div><a href="https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tsadjointts.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tsadjointts.c-700">https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tsadjointts.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tsadjointts.c-700</a></div><div><a href="https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tsadjointts.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tsadjointts.c-376">https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tsadjointts.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tsadjointts.c-376</a><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><div><br></div></span><div>For people like me who do not have all the terminology down, is the Tangent Linear Model (TLM) just the forward sensitivities?</div></div></div></div></blockquote><div><br></div><div>Yes. See the man page for TLMTS for the Tangent linear model ODE.</div><div><a href="https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tstlmts.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tstlmts.c-403">https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tstlmts.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tstlmts.c-403</a><br></div><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"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="gmail-"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_extra"><div><div class="gmail-m_-1053851145056487031h5"><br><div class="gmail_quote">2017-10-15 18:14 GMT+03:00 Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Someone had to do it.<div><br></div><div>I will not try to frame the entire discussion. Barry has already thrown down the "show me your interface" gauntlet. However, I want to emphasize one point that may have been lost in the prior discussion. Every example I have looked at so far is focused on the reduced space formulation of the optimization problem. However, I am interested in the full space formulation so that I can do multigrid on the entire optimal control problem. This is not a new idea, in particular Borzi does this in SIAM Review in 2009. I think we have a tremendous opportunity here since other codes cannot do this, it has the potential (I think) for much better globalization, and perhaps can be faster.</div><div><br></div><div>So, when we come up with interface proposals, I think we should keep a full space solution method in mind.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt<span class="gmail-m_-1053851145056487031m_-1737042547783733115HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div class="gmail-m_-1053851145056487031m_-1737042547783733115m_3105174786533026374gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~k<wbr>nepley/</a><br></div></div></div></div></div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="gmail-m_-1053851145056487031HOEnZb"><font color="#888888">-- <br><div class="gmail-m_-1053851145056487031m_-1737042547783733115gmail_signature">Stefano</div>
</font></span></div>
</blockquote></span></div><span class="gmail-"><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_-1053851145056487031gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~<wbr>knepley/</a><br></div></div></div></div></div>
</span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Stefano</div>
</div></div>