We want to support both in a clean way.

> On Jul 26, 2017, at 10:17 AM, Zhang, Hong <hongzh...@anl.gov> wrote:
> 
> 
> > On Jul 26, 2017, at 9:31 AM, Lisandro Dalcin <dalc...@gmail.com> wrote:
> > 
> > On 26 July 2017 at 16:34, Stefano Zampini <stefano.zamp...@gmail.com> wrote:
> >> 
> >> We should come to an agreement on it, as it is used to monitoring a TSSolve
> >> call, and to save the trajectory, as per commit
> >> 
> > 
> > WTF??? Who changed the calls to TSMonitor() to use ts->total_steps ?
> > What's the rationale? So now I get this output with two successive
> > {TSSetTime(ts,0); TSSolve(ts,NULL)} calls using -ts_monitor
> > -ts_max_steps 3:
> > 
> > 0 TS dt 0.005 time 0.
> > 1 TS dt 0.00623684 time 0.005
> > 2 TS dt 0.00630727 time 0.0112368
> > 3 TS dt 0.00638241 time 0.0175441
> > 3 TS dt 0.00638241 time 0.
> > 4 TS dt 0.00814772 time 0.00638241
> > 5 TS dt 0.00772423 time 0.0145301
> > 6 TS dt 0.00706187 time 0.0222544
> > 
> > Barry, what should be the behavior of two successive TSSolve() calls?
> > Should the ts->step counter be reset to 0 or not? Otherwise, we should
> > we need a ts->init_time to set ts->ptime=ts->init_time before starting
> > to step.
> > 
> > So, in short there are two possible behaviors:
> > 
> > 1) A second (and third, and so on) TSSolve() continues from the place
> > the previous solve stoped, the ts->step counter is not reset, the
> > ts->steprestart for multistep methods (and FSAL property in RK) is not
> > reset (and probably not reset ksp/snes iteration counters).
> > 
> > 2) A TSSolve() start always fresh, the initial time and time step are
> > restored from values stashed int the TS structure, all counters are
> > reset, and so on, whatever is needed
> > 
> > Barry, as our benevolent dictator for life, could you please rule on
> > this? Maybe the first behavior I mentioned is the right one, but if we
> > go for it, we should provide some API to support the second case (eg,
> > TSRestart()).
> 
> Yes, when we do two consecutive TSSolve(), the first behavior is expected, 
> except that TSSolve() resets ts->steps, not ts->total_steps.
> 
> For the second case, I agree we need some better API because TSReset() resets 
> everything but sometimes we need to reset just the step counters.
> 
> Hong
> 
> > 
> > As usual after a complaint, I volunteer to implement any required change.
> > 
> > 
> > 
> > 
> > -- 
> > Lisandro Dalcin
> > ============
> > Research Scientist
> > Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
> > Extreme Computing Research Center (ECRC)
> > King Abdullah University of Science and Technology (KAUST)
> > http://ecrc.kaust.edu.sa/
> > 
> > 4700 King Abdullah University of Science and Technology
> > al-Khawarizmi Bldg (Bldg 1), Office # 0109
> > Thuwal 23955-6900, Kingdom of Saudi Arabia
> > http://www.kaust.edu.sa
> > 
> > Office Phone: +966 12 808-0459
> 

Reply via email to