When using Newton solver with zero initial guess:
Solving nonlinear variational problem.
Newton iteration 0: r (abs) = 2.333e+01 (tol = 1.000e-08) r (rel) = 1.000e+00 (tol = 1.000e-07)
Newton iteration 1: r (abs) = 2.264e+03 (tol = 1.000e-08) r (rel) = 9.701e+01 (tol = 1.000e-07)
The residual drops after this and converges in 10 iterations.
But when I use snes_solver with line search, it is unable to reduce the residual after obtaining the value above and produces:
Line search: Cubic step no good, shrinking lambda, current gnorm 3.205948897925e+03 lambda=1.0000000000000007e-13
Line search: unable to find good step length! After 12 tries
Line search: fnorm=2.3334499970834795e+01, gnorm=3.2059488979247935e+03, ynorm=8.8411820675344393e+02, minlambda=9.9999999999999998e-13, lambda=1.0000000000000007e-13, initial slope=-5.4449888888888904e+02
*** Warning: PETSc SNES solver diverged in 0 iterations with divergence reason DIVERGED_LINE_SEARCH.
Would someone know why is this happening ? Any fixes for this ? Thanks.