<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
</span>I don't follow why multi-objective optimization would be any different.<br>
Are you supposing that the different objective functions would be<br>
implemented by different software packages?<br>
<span class=""><br></span></blockquote><div><br></div><div>It was related on how I was thinking to support multi-objective optimization (and thus multi-gradient) with the current AdjointTS, since each adjoint run would definitely have a different adapted time step.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
</span>There are a bunch of other places that allow nonlinear dependence on<br>
parameters yet don't pass that parameter Vec, including<br>
TSSetRHSFunction. If it is passed explicitly in one such function, it<br>
needs to be passed explicitly in all.<br>
<span class=""><br></span></blockquote><div><br></div><div>Yes but TSSetRHSFunction is supposed to work for standard ODE solves (not with the parameter dependent analysis enabled). What if instead we add a design Vec to TS data?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
> I can add a comment on the man pages that the vectors are guaranteed<br>
> to be the same one passed in my TSSetUpFromDesign, or remove<br>
> them. Your call.<br>
<br>
</span>It's a recipe for confusion. Either the parameters are never passed<br>
explicitly or they are always passed explicitly and should not be stored<br>
redundantly in the context, thus perhaps enabling some sort of higher<br>
level analysis that dynamically changes parameter values. I would go<br>
with the former for now.<br>
<span class=""><br>
> Users can do anything they want with the forward model context, but they<br>
> are not free to change the application context of the adjoints TS. Maybe<br>
> this should be improved by adding and extra slot to AdjointTSCtx to carry<br>
> over the user context (for the adjoint I mean)?<br>
<br>
</span>Why do you need to own the application context for the adjoint TS,<br>
versus using the context parameters to TSSetRHSJacobian, etc.<br>
<br></blockquote><div><br></div><div>You're right, I could have used the contexts. This can be fixed.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
</span>Comments that some lines of code can be deleted is a good sign that they<br>
should be deleted.<br>
<span class=""><br></span></blockquote><div><br></div><div>Will do</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
</span>I was responding to your statement that "Initial condition dependence on<br>
the parameters is limited to linear dependence on all the variables" in<br>
his approach. General dependence is supported, the user is just<br>
expected to call it themselves rather than registering a callback that<br>
TS calls.<br>
<span class=""><br></span></blockquote><div><br></div><div>This implies some knowledge from the users about how to take this gradient, which you cannot assume in general.</div><div>If you can automatize it, why not?</div><div> </div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
</span>I see reasons for the adjoint TS to hold a reference to the forward TS,<br>
but not vice-versa. What is the use case for your proposal below?<br>
<div class="HOEnZb"><div class="h5"><br>
> TSGetAdjointTS(TS f,TS* a) {<br>
> if (!f->adjtts) TSCreateAdjointsTS(f,&f-><wbr>adjts);<br>
> *a = f->adjts:<br>
> }<br>
><br>
> and the corresponding Setter to allow users to do<br>
><br>
> TSCreateAdjointTS(ts,&atts)<br>
> TSSetRHSJacobian(ats,...)<br>
> TSSetAdjointTS(ts,ats)<br>
><br>
> or<br>
><br>
> TSGetAdjointTS(ts,&atts)<br>
> TSSetRHSJacobian(ats,...)<br>
</div></div></blockquote><div><br></div><div>Just automating TSComputeObjectiveAndGradient() for PDAEs with user defined adjoints,</div><div> </div></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Stefano</div>
</div></div>