Question on TS_EULER

Matthew Knepley knepley at gmail.com
Thu Apr 24 08:54:07 CDT 2008


That is a bug. I have just fixed it in petsc-dev. You can easily fix it in
your copy (if you are using the release) by changing line 41 to

    ierr = VecAXPY(sol,ts->time_step,update);CHKERRQ(ierr);

    Matt

On Wed, Apr 23, 2008 at 10:04 PM, Ningyu Liu <nliu at fit.edu> wrote:
> Hello,
>
> Is there a way by which the timestep of the explicit forward Euler method
> can be modified during the iterations? Looking at the source code of the
> method, the timestep dt is set when entering the function TSStep_Euler().
> The iteration proceeds with this fixed timestep even calling TSSetTimeStep()
> in a monitoring function. I personally find it's a bit confusing. The actual
> solution is obtained with fixed timestep. However,  the time returned from
> calling TSGetTime() takes into account any modifications made by the user.
> Thanks.
>
> Regards,
>
> Ningyu



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




More information about the petsc-users mailing list