<div dir="ltr"><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;line-height:normal">Dear PETSc developers,</span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;line-height:normal"><br></span></div><div><font color="#000000" face="Times New Roman" size="3"><span style="line-height:normal">Is the active set in NewtonRSLS defined differently from the reference* you give in the documentation on purpose?</span></font></div><div><font color="#000000" face="Times New Roman" size="3"><span style="line-height:normal">The reference defines the active set as:</span></font></div><div><font color="#000000" face="Times New Roman" size="3"><span style="line-height:normal">x_i = 0 and F_i > 0,</span></font></div><div><font color="#000000" face="Times New Roman" size="3"><span style="line-height:normal">whilst the PETSc code defines it as x_i = 0 and F_i >= 0 (vi.c: 356) :</span></font></div><div><pre width="80" style="color:rgb(0,0,0);line-height:normal">!((PetscRealPart(x[i]) > PetscRealPart(xl[i]) + 1.e-8 || (PetscRealPart(f[i]) < 0.0)</pre></div><div><font color="#000000" face="Times New Roman" size="3"><span style="line-height:normal">So PETSc freezes the variables if f[i] == 0.</span></font></div><div><font color="#000000" face="Times New Roman" size="3"><span style="line-height:normal"><br></span></font></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;line-height:normal">I've been using the Newton RSLS method to ensure positivity in a subsurface flow problem I'm working on. My solution stays almost constant for two timesteps (seemingly independent of the size of the timestep), before it goes towards the expected solution.</span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;line-height:normal">From my initial conditions, certain variables are frozen because x_i = 0 and f[i] = 0, and I was wondering if that could be the cause of my issue.</span></div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;line-height:normal"><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;line-height:normal"><br></span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;line-height:normal"><br></span></div>*:</span><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;line-height:normal">- T. S. Munson, and S. Benson. Flexible Complementarity Solvers for Large-Scale Applications, Optimization Methods and Software, 21 (2006).</span><br><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;line-height:normal"><br></span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;line-height:normal"><br></span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;line-height:normal">Regards,</span></div><div><span style="color:rgb(0,0,0);font-family:'Times New Roman';font-size:medium;line-height:normal">Ozzy</span></div></div></div>