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

Jed Brown jed at jedbrown.org
Wed Feb 11 20:45:03 CST 2015


Pierre Barbier de Reuille <pierre.barbierdereuille at gmail.com> writes:

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

TSPostStage is only called *after* the stage has been accepted (the step
might be rejected later, e.g., based on a local error controller).

We should pass the stage solution to TSAdaptCheckStage so you can check
it there.  I can add this, but I'm at a conference in Singapore this
week and have a couple more pressing things, so you'd have to wait until
next week unless someone else can do it (or you'd like to submit a
patch).

We should also add TSSetSetFunctionDomainError() so you can check it
there (my preference, actually).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150211/516ee0e8/attachment-0001.pgp>


More information about the petsc-users mailing list