Hi Matt, Thanks for your response. The problem I tried to test has analytical solution. I think something wrong with the matrix.
On Thu, Dec 19, 2013 at 4:54 PM, Matthew Knepley <[email protected]> wrote: > On Thu, Dec 19, 2013 at 4:26 PM, Que Cat <[email protected]> wrote: > >> Hello, >> >> 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: >> Norm of matrix ratio 1.39606e-23 difference 1.53372e-14 (user-defined >> state) >> Norm of matrix ratio 3.03157e-10 difference 0.33305 (constant state -1.0) >> Norm of matrix ratio 3.03157e-10 difference 0.33305 (constant state 1.0) >> 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? >> > > It appears that your Jacobian is correct, or at least has an error that is > much smaller than most of the elements. > > >> The SNES solver for failed with the reason -6 "the line search failed". >> I tried with all other line search method stated in the PETSC manual, but >> they all failed. >> > > Do you know that the problem has a solution. Its possible that there is no > real solution. > > Matt > > >> 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. >> >> QUe >> >> > > > -- > What most experimenters take for granted before they begin their > experiments is infinitely more interesting than any results to which their > experiments lead. > -- Norbert Wiener >
