[petsc-users] Setting step acceptance criteria and/or domain validity using TS module
Jed Brown
jed at jedbrown.org
Mon Feb 9 20:02:57 CST 2015
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 --------------
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/20150209/e3697723/attachment-0001.pgp>
More information about the petsc-users
mailing list