[petsc-users] Modifying the computed TS step, TSSetPostStep vs TSSetPostEvaluate
Mark Lohry
mlohry at gmail.com
Sun Jul 22 09:17:00 CDT 2018
Thanks Stefano.
If the filter is part got your residual evaluation (your R), then you
> should do it inside your RHS function itself.
I've tried this and it works okay for explicit, but with implicit it seems
to totally tank the krylov convergence.
Instead, if the filter applies to y(t+dt), you should do it in
> PostEvaluate. Note that PostStep is equivalent to PostEvaluate if you don’t
> have TSEvents set.
And it's okay to call a TSSetSolution here without any side effects?
The filter is only applied to the time step direction, not y(t+dt) itself
(i.e. if R=0 then y(t+dt) should equal y(t) without any filter effects), so
I assume I'll have to store the previous time step and manually do the
arithmetic here.
On Sun, Jul 22, 2018 at 10:06 AM, Stefano Zampini <stefano.zampini at gmail.com
> wrote:
> If the filter is part got your residual evaluation (your R), then you
> should do it inside your RHS function itself.
>
> Instead, if the filter applies to y(t+dt), you should do it in
> PostEvaluate. Note that PostStep is equivalent to PostEvaluate if you don’t
> have TSEvents set.
>
> > On Jul 22, 2018, at 11:13 AM, Mark Lohry <mlohry at gmail.com> wrote:
> >
> > For the time iteration
> >
> > y(t+dt) = y(t) + dt * R(y,t,...)
> >
> > I need to apply a spectral filter to R prior to moving to the next step,
> e.g. so not use exactly the step computed by TS.
> >
> > Where is the appropriate place to do this? SNES provides
> SNESLineSearchSetPostCheck where you can modify the newton step; is there a
> TS equivalent?
> >
> > Or do I need to internally maintain a copy of y(t) to re-compute R and
> then call TSSetSolution with a modified vector?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180722/b0442904/attachment.html>
More information about the petsc-users
mailing list