<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>I am using SNES to solve an nonlinear equation f(u), and I know all the u_i should be 0 and 1.</div><div><br></div><div>First, I use SNES without constraint, and it converges.</div><div><br></div><div>But, If I set </div><div>     SNESSetType(snes,<wbr>SNESVINEWTONRSLS,ierr)</div><div>     SNESVISetVariableBounds(snes,<wbr>xl,xu,ierr)</div><div><br></div><div>where xl and xu is vector, and xl_i=0 and xu_i=1</div><div><br></div><div>then SNES fails to converge, because linesearch fails(snes reason = -6), and the norm of residual is not reducing(the norm of incremental solution is reducing)</div><div><br></div><div>The reason to add constraint is that I want to implement some irreversibility.</div><div><br></div><div><br></div><div>Thanks,</div><div>Josh  </div><div> </div></div></div></div>