Hi Hong,

I am using adaptive timestepping (ARKIMEX, fully implicit).

Best Regards,

Moritz

Am 03.02.19 um 01:59 schrieb Zhang, Hong:
Hi Moritz,

Are you using adaptive time stepping or fixed time stepping? When a fixed 
stepsize is used, the next time step after an event will be set to the 
remaining part of the time step automatically. In your example, presumably the 
stepsize is dt = 0.2, the trajectory should look like
t=0.9
t=1.0 (event time)
t=1.1
t=1.3
...

So a very small stepsize after an event is expected if the event occurs near 
the end of the original time step.

Hong (Mr.)

On Feb 2, 2019, at 12:08 PM, Moritz Huck via petsc-users 
<petsc-users@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

Best Regards,
Moritz
        

Reply via email to