<div dir="ltr"><span style="font-size:13.1999998092651px;line-height:19.7999992370605px">Hello,</span><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">Looking for methods to ensure negative values are rejected, I found this in the archives:</div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><a href="http://lists.mcs.anl.gov/pipermail/petsc-users/2014-June/021978.html" target="_blank">http://lists.mcs.anl.gov/pipermail/petsc-users/2014-June/021978.html</a><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">The answer gives two options:</div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"> 1 - Set a function for the step acceptance criteria</div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"> 2 - Set a domain violation for the function</div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">However, I cannot find any information on how to do either things.</div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">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). For (2), I am not even sure where to start.</div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">Thanks,</div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">Pierre Barbier de Reuille</div><div><br></div></div>