[petsc-dev] Time-Steppers: how to stop and resume iterations at intermediate times?

Alexis Marboeuf alexis.marboeuf at hotmail.fr
Wed Oct 19 16:41:01 CDT 2022


Hi Matt,
Thanks a lot for your answer. I am going to define a monitoring function. And I will adapt the time step with TSAdapt to ensure I hit the exact intermediate times I am interested in inside a TSSolve.
Best,
Alexis
________________________________
De : Matthew Knepley <knepley at gmail.com>
Envoyé : mardi 18 octobre 2022 23:12
À : Alexis Marboeuf <alexis.marboeuf at hotmail.fr>
Cc : petsc-dev at mcs.anl.gov <petsc-dev at mcs.anl.gov>
Objet : Re: [petsc-dev] Time-Steppers: how to stop and resume iterations at intermediate times?

On Tue, Oct 18, 2022 at 3:49 PM Alexis Marboeuf <alexis.marboeuf at hotmail.fr<mailto:alexis.marboeuf at hotmail.fr>> wrote:
Dear Petsc Team,
I am using a TS object to integrate my equation in time. I set the final time using TSSetMaxTime. My question is about a proper way to stop and resume iterations at intermediate times inside the TSSolve. I would like to stop when reaching exactly some given intermediate times, do some work (writing my intermediate solution for example) and then resume iterations.

The easiest way to do this I think is to just set a monitor, which will tell you what time it is. Just check the time, and perform your action.

  Thanks,

     Matt

Thanks a lot for your time and your help.
Best,
Alexis


--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/<http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20221019/8458a7de/attachment.html>


More information about the petsc-dev mailing list