<div dir="ltr">Hello,<div><br></div><div>Looking for methods to ensure negative values are rejected, I found this in the archives:</div><div><br></div><div><a href="http://lists.mcs.anl.gov/pipermail/petsc-users/2014-June/021978.html">http://lists.mcs.anl.gov/pipermail/petsc-users/2014-June/021978.html</a><br></div><div><br></div><div>The answer gives two options:</div><div> 1 - Set a function for the step acceptance criteria</div><div> 2 - Set a domain violation for the function</div><div><br></div><div>However, I cannot find any information on how to do either things.</div><div><br></div><div>For (1), I tried to use TSSetPostStep, but I couldn't figure out how to retrieve the current solution (it seems the vector in TSGetSolution is not yet set). For (2), I am not even sure where to start.</div><div><br></div><div>Thanks,</div><div><br></div><div>Pierre Barbier de Reuille</div><div><br></div></div>