Hello,

I'm on petsc version 3.4.5.

My program has a time loop where I have to solve a non-linear system of the 
form F(X) = D*L*J + I + kappa(X) where X is an unknown vector, D and L are 
diagonal square matrices, J is a vector that can be calculated by solving a 
linear system with X and kappa is a non-linear application. I use the 
"-snes_mf" option to, as I understand it, approximate the Jacobian using finite 
differences.

A first version of my problem could be solved, so I made it more complex by 
changing the values of the matrix L, which used to have the same value on the 
whole diagonal and now has values of the same order of magnitude but different. 
This second version takes longer and doesn't converge after a while. I get the 
message: Nonlinear solve did not converge due to DIVERGED_LINEAR_SOLVE. 
However, when I look at the faq 
(https://petsc.org/release/faq/#why-is-newton-s-method-snes-not-converging-or-converges-slowly),
 it indicates that it's probably a Jacobian problem. What should I do? Do I 
have to calculate the explicit Jacobian? The explicit Jacobian requires the 
inversion of a matrix (due to the linear system for solving J).


Kind regards,

Harry Cousin

<https://petsc.org/release/faq/#why-is-newton-s-method-snes-not-converging-or-converges-slowly>

Reply via email to