[petsc-users] Setting step acceptance criteria and/or domain validity using TS module

Pierre Barbier de Reuille pierre.barbierdereuille at gmail.com
Wed Feb 11 10:10:22 CST 2015


Ok, I made progress. But:

 1 - whatever I do, I have very slightly negative values, and therefore all
my steps get rejected (values like 1e-16)
 2 - As I expected, SNES is only used with implicit methods. So if I use
explicit Runge-Kutta, then there is no solution vector stored by the SNES
object.

Reading the code for the Runge-Kutta solver, it seems that TSPostStage is
where I can retrieve the current state, and TSAdaptCheckStage where I can
reject it. But is this something I can rely on?

Thanks,

Pierre

On Wed Feb 11 2015 at 02:45:26 Jed Brown <jed at jedbrown.org> wrote:

> Pierre Barbier de Reuille <pierre.barbierdereuille at gmail.com> writes:
>
> > Ok, it seems if I set the domain error from the rhs function, it will
> > indeed fail and backtrack. I hope that is what was intended?
>
> Yes, the PostStep (or PostStage) callbacks are not intended for this.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150211/c3e78145/attachment-0001.html>


More information about the petsc-users mailing list