<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I don't need this feature immediately and don't think I can devote the time for it over the next three months. I can work on this probably next year starting April. I've added it to bitbucket issues.<div><br></div><div>Shri<br><div><div>On Dec 13, 2012, at 2:06 PM, Jed Brown wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Okay, who is working on this? (Is it me?) What is the timeline? Can you add it to bitbucket issues so we can keep track? (There is a decent amount of work incorporating it into all the methods.)<div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 11, 2012 at 5:42 AM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">
<br>
  Right,  providing this "list of times" as a user provided function (not as an array of doubles) is a more general and better interface. I have no problem with that. (Note that one's provided function could simple access values in an array as appropriate :-), so Sean and my simple case are also supported.<br>

<span class="HOEnZb"><font color="#888888"><br>
    Barry<br>
</font></span><div class="im HOEnZb"><br>
On Dec 10, 2012, at 11:59 PM, Shri <<a href="mailto:abhyshr@mcs.anl.gov">abhyshr@mcs.anl.gov</a>> wrote:<br>
<br>
> I think Jed is right. Rather than giving a list of times, it is better to provide user-defined callback function (or functions?) for detecting the non-smoothness or hitting a time before ts->final_time. MATLAB Ode solvers call these discontinuities as 'EVENTS' and provide callback functions to detect them. <a href="http://www.mathworks.com/help/matlab/ref/ode23.html" target="_blank">http://www.mathworks.com/help/matlab/ref/ode23.html</a>.<br>

><br>
> In the power grid project that I'm involved in, there can be three possibilities (could be more) when the DAE integrator needs to be stopped.<br>
><br>
> i) An exogenous event such as a random disturbance at a given prespecified time.<br>
> ii) The removal of this disturbance at another prespecified time. (only for analysis)<br>
> iii) The removal of this disturbance due to some switching (switch on/off) based on threshold crossing (the threshold crossing and  switching action could be at the same time or delayed).<br>
> iv) Some switching action due to abnormal conditions.<br>
><br>
> Later on in the project, we will be passing the states from TS at the end of each time step to a commercial software that decides the switching logic and passes the switching times back to TS PostStep() interface. Thus, there could be a need of stopping TS based on the switching times.<br>

><br>
> Another example of event detection is in circuit simulation where in the zero crossing of the waveform needs to be detected.<br>
><br>
> I think having callback functions for 'EVENTS' would be the right approach.<br>
><br>
> I recently requested for a couple of features in TS and Jed, Barry, and Emil kindly :) agreed<br>
> i) The feature of hitting the exact time has been added to the adaptive time-step controller and can be accessed via -ts_exact_final_time MATCHSTEP. Note that this is not available with methods that don't use an adaptive controller.<br>

> ii) TS can be stopped at any given time via TSPostStep() by calling TSSetConvergedReason() with the flag TS_CONVERGED_USER.<br>
><br>
> Shri<br>
</div><div class="HOEnZb"><div class="h5">> On Mon, Dec 10, 2012 at 8:36 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>
>  I'd the ability to provide to TS a list of times at which I'd like the ODE integrator have exactly match that time on a time-step (that is adjust the delta t near that time to hit it exactly).  This is something Shri needs.<br>

><br>
> Is this general enough to add to the library itself? He can write an adaptive controller that hits any times he wants.<br>
><br>
> As a library feature, I'd be more interested in having a controller that attempted to hit the zeros of a user-provided functional (because that could be used for other forms of model nonsmoothness).<br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>
</blockquote></div><br></div></body></html>