[petsc-users] Setting step acceptance criteria and/or domain validity using TS module
Pierre Barbier de Reuille
pierre.barbierdereuille at gmail.com
Tue Feb 10 13:34:34 CST 2015
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?
I tried before to set it in the PostStep function, but I couldn't get the
current solution from there, SNESGetSolution returns an empty vector.
Cheers,
Pierre
On Tue Feb 10 2015 at 03:03:06 Jed Brown <jed at jedbrown.org> wrote:
> Pierre Barbier de Reuille <pierre.barbierdereuille at gmail.com> writes:
>
> > Hello,
> >
> > Looking for methods to ensure negative values are rejected, I found this
> in
> > the archives:
> >
> > http://lists.mcs.anl.gov/pipermail/petsc-users/2014-June/021978.html
> >
> > The answer gives two options:
> > 1 - Set a function for the step acceptance criteria
> > 2 - Set a domain violation for the function
> >
> > However, I cannot find any information on how to do either things.
> >
> > For (1), I tried to use TSSetPostStep, but I couldn't figure out how to
> > retrieve the current solution (it seems TSGetSolution returns the last
> > valid solution).
>
> I would use TSAdaptSetCheckStage, but it also doesn't give you access to
> the stage solution, except via TSGetSNES and SNESGetSolution (which
> should work, but I think I should update the interface to pass in the
> stage solution).
>
> > For (2), I am not even sure where to start.
>
> TSGetSNES and SNESSetFunctionDomainError.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150210/9af5bb3b/attachment.html>
More information about the petsc-users
mailing list