[petsc-users] [TimeStepping] Eventhandler

Moritz Huck moritz.huck at rwth-aachen.de
Sun Feb 3 06:08:43 CST 2019


Hi Barry,

src/ts/examples/tutorials/ex40.c (run with ARKIMEX3 and initial dt=1e-2) 
has the same behavior:

TSEvent: iter 0 - Event 0 interval detected [3.61 - 4.11]
TSEvent: iter 1 - Stepping forward as no event detected in interval 
[3.61 - 4.07796]
TSEvent: iter 2 - Stepping forward as no event detected in interval 
[4.07796 - 4.08161]
TSEvent: Event 0 zero crossing at time 4.08163 located in 3 iterations
Ball hit the ground at t =  4.08 seconds
       TSAdapt basic arkimex 0:3 step  13 accepted t=4.11       + 
1.000e-02 dt=1.000e-01  wlte=    0  wltea=   -1 wlter=   -1

       TSAdapt basic arkimex 0:3 step  14 accepted t=4.12       + 
1.000e-01 dt=5.000e-01  wlte=    0  wltea=   -1 wlter=   -1

It continues at the end of the "event interval" with the initial timestep.

Best Regards,

Moritz




Am 03.02.19 um 02:43 schrieb Smith, Barry F.:
>
>> On Feb 2, 2019, at 12:08 PM, Moritz Huck via petsc-users <petsc-users at mcs.anl.gov> wrote:
>>
>> Hi,
>> I am trying to use SetEventHandler.
>> I hav eencountered two "problems":
>>
>> 1. after an event is encountered the next time step is needlessly small (h=1e-6), even if a don't change anything in the function (for testing).
>>
>>
>> 2. the integration does not continue at the event encounter
>> e.g. my eventfunction is g(t,u)=t-1,
>> the event is found in the step from t= 0.9 to 1.1 at tevent=1
>> but the next step is not 1+dt but it is 1.1 + dt
>> I would expect the next step to be 1.+dt
>       Hmm, this sounds like it could be an error. Could you send us a simple code that exhibits it?
>
>     Thanks
>
>     Barry
>
>> Best Regards,
>> Moritz
>> 	


More information about the petsc-users mailing list