[petsc-dev] TSStartingMethod_GLEE

Lisandro Dalcin dalcinl at gmail.com
Sun Apr 30 14:54:01 CDT 2017


Emil, you added the slot ts->ops->startingmethod, which currently is
just used for TSStartingMethod_GLEE(). The slot
ts->ops->startingmethod is called in TSSetUp()

Could you please explain what's the pourpose of
ts->ops->startingmethod ? TSStartingMethod_GLEE() is so simple that I
cannot figure out without digging deep in the GLEE implementation.

If it is for what I think, I'm afraid that your approach will not work
in general, and particularly in the case of handling TSEvent, where
discontinuities in the solution may be introduced, and you have to
start the time integration almost from scratch discarding previous
history (e.g. in the case of BDF go back to BDF-1).

Look at BDF, you most likely want to use the ts->steprestart flag to
figure out whether you should use a starting method. I spent quite a
bit of time making sure the ts->steprestart flag is handled
appropriately in the case of initial step or TSEvent, and unless
someone broke it recently, it should be doing the job.

Also look at BDF or RK, you may need to handle appropriately the
ts->steprollback flag, in the case of RK I'm querying the flag to
disable the FSAL optimization. In general, if ts-rollback turns is
TRUE, some cached values in your TS subtype may get outdated and you
have to handle this case appropriately.

Finally, if the ts->steprestart flag is actually enough, please update
GLEE and remove ASAP the ts->ops->startingmethod slot to prevent
accumulation of cruft.

static PetscErrorCode TSStep_BDF(TS ts)
{
  ...
  while (!ts->reason ...) {
    if (ts->steprestart) {
      ierr = TSBDF_Restart(ts,&stageok);CHKERRQ(ierr);
      ...
    }
  ...
  }


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



More information about the petsc-dev mailing list