<div dir="ltr">Hello,<div><br></div><div>I use SNES to solve the non linear coupled equations. I have checked the hand-coded jacobian with -snes_type test and received the result:</div><div><div>Norm of matrix ratio 1.39606e-23 difference 1.53372e-14 (user-defined state)</div>
<div>Norm of matrix ratio 3.03157e-10 difference 0.33305 (constant state -1.0)</div><div>Norm of matrix ratio 3.03157e-10 difference 0.33305 (constant state 1.0)</div></div><div>It said that "  if the ratio is O(1.e-8), the hand-coded Jacobian is probably correct." What is the second paramenter "difference 1.53372e-14 ...."? Does it play any role in checking the accuracy of hand-coded jacobian?</div>
<div><br></div><div>The SNES solver for failed with the reason -6 "<span style="color:rgb(0,0,0)">the line search failed". I tried with all other line search method stated in the PETSC manual, but they all failed. </span></div>
<div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">I tried to figure out what is wrong with my code? Could you please give me any recommendation to direct me how to check my code? I appreciate your help.</span></div>
<div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)">QUe</span></div><div><br></div></div>