Dear all,
I was solving a nonlinear variational form using SNES solver in Fenics. However the SNES solver diverged and the generated SNES Function norm is wired:
......
494 SNES Function norm 1.225656496452e-04
495 SNES Function norm 2.796984171885e-01
496 SNES Function norm 1.225656496172e-04
497 SNES Function norm 2.796984171884e-01
498 SNES Function norm 1.225656496065e-04
499 SNES Function norm 2.796984171884e-01
500 SNES Function norm 1.225656494447e-04
*** Warning: PETSc SNES solver diverged in 500 iterations with divergence reason DIVERGED_MAX_IT.
As we can see, the SNES Function norm is 1.22e-04, then 2.79e-01, and then 1.22e-04 again. Does anyone know why the SNES Function norm is repeating and how to solve this issue?
Below is the parameters of the SNES solver I used:
prm = {"nonlinear_solver": "snes",
"snes_solver": {
"linear_solver": "lu",
"absolute_tolerance": 1e-4,
"relative_tolerance": 1e-4,
"maximum_iterations": 500,
"report": True,
"error_on_nonconvergence": True}
}
I appreciate any help.