<div class="gmail_quote">On Sun, Oct 23, 2011 at 15:20, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The simplest could be simply -ts_monitor_dt .1 and then there could be a version that takes an array of times.</blockquote></div><div><br></div><div>I think we want to have each monitor run with a different set of times. This could make an API like:</div>
<br><div>TSMonitorSet(TS ts,PetscInt ntimes,PetscReal *times,PetscErrorCode (*monitor)(TS,PetscInt,PetscReal,Vec,void*),void *mctx,PetscErrorCode (*mdestroy)(void**));</div><div><br></div><div>where ntimes=0 implies every step.</div>
<div><br></div><div>But there are lots of other ways the user might want to specify:</div><div><br></div><div>1. every N steps, whatever the size</div><div><br></div><div>2. at regular intervals, but simulation will do many millions of steps, so don't want to name all the times up-front.</div>
<div><br></div><div>3. user-defined, possibly based on the solution (e.g. write the state at the beginning of the step when an eigenvalue of Jacobian crosses imaginary axis during the step).</div><div><br></div><div><br></div>
<div>What's wrong with the monitor making all these decisions? I would prefer that, but it means that every kind of monitor needs its own implementation of the interpolated time interval feature.</div>