<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"><span class="gmail-"><br>
<br>
</span>It'd have to be TSAddObjective if you're building a list.  Convention is<br>
that Set replaces what might have been there before.<br>
<br></blockquote><div><br></div><div>Fair enough</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">
In case of multiple objectives, there may be a performance reason to<br>
amortize evaluation of several at once, though the list interface is<br>
convenient.  Consider common objectives being quantities like lift and<br>
drag on different surfaces of a fluids simulation or stress/strain at<br>
certain critical joints in a structure.  Although these have some<br>
locality, it's reasonable to assume that state dependence will have<br>
quickly become global, thus make no attempt to handle sparse<br>
representations of the adjoint vectors lambda.<br>
<span class="gmail-"><br></span></blockquote><div><br></div><div>I don't get this comment. Is it related with multi-objective optimization (e.g. Pareto)?</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"><span class="gmail-"><br>
</span>How are parameters accessed in TSComputeRHSFunction?  It looks like<br>
they're coming out of the context.  Why should this be different?  (If<br>
parameters need to go into a Vec, we could do that, but it comes at a<br>
readability and possibly parallel cost if the global Vec needs to be<br>
communicated to local vectors.)<br>
<span class="gmail-"><br></span></blockquote><div><br></div><div>design paramaters are fixed troughout an adjoint/tlm run. They can be communicated locally once at the beginning of the run.</div><div>This is what TSSetUpFromDesign and TSSetSetUpFromDesign are supposed to handle, if I get your comment.</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-579">https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tspdeconstrainedutils.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tspdeconstrainedutils.c-579</a><br></div><div><br></div><div>Here is how ex23.c uses it</div><div><br></div><div><a href="https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/examples/tutorials/ex23.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#ex23.c-677">https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/examples/tutorials/ex23.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#ex23.c-677</a><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"><span class="gmail-">
> Both methods need the Jacobian of the DAE wrt the parameters: H<br>
> TSAdjointSetRHSJacobian(), S TSSetGradientDAE()<br>
><br>
> Initial condition dependence on the parameters is implicitly computed in<br>
> Hong's code (limited to linear dependence on all the variables);<br>
<br>
</span>How so?  Once the user gets \lambda(time=0), they can apply the chain<br>
rule to produce any dependency on the parameter vector?<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br></div></div></blockquote><div> Yes, the chain rule is implemented here</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-254">https://bitbucket.org/petsc/petsc/src/c2e9112e7fdfd89985f9ffc4d68b0d46cf7cad52/src/ts/interface/tspdeconstrainedutils.c?at=stefano_zampini%2Ffeature-continuousadjoint&fileviewer=file-view-default#tspdeconstrainedutils.c-254</a><br></div><div> </div></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Stefano</div>
</div></div>