[petsc-dev] TS monitoring at fixed times?

Jed Brown jedbrown at mcs.anl.gov
Fri Nov 11 00:08:22 CST 2011


On Sun, Oct 23, 2011 at 15:20, Barry Smith <bsmith at mcs.anl.gov> wrote:

> The simplest could be simply -ts_monitor_dt .1  and then there could be a
> version that takes an array of times.


I think we want to have each monitor run with a different set of times.
This could make an API like:

TSMonitorSet(TS ts,PetscInt ntimes,PetscReal *times,PetscErrorCode
(*monitor)(TS,PetscInt,PetscReal,Vec,void*),void *mctx,PetscErrorCode
(*mdestroy)(void**));

where ntimes=0 implies every step.

But there are lots of other ways the user might want to specify:

1. every N steps, whatever the size

2. at regular intervals, but simulation will do many millions of steps, so
don't want to name all the times up-front.

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).


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20111111/5c51d47b/attachment.html>


More information about the petsc-dev mailing list