[petsc-users] Problem with snes: petsc 3.4.5
Barry Smith
bsmith at petsc.dev
Wed Sep 20 09:26:41 CDT 2023
Run with -snes_monitor and -ksp_monitor_true_residual and send the output
> On Sep 20, 2023, at 9:34 AM, Harry-Arthur Cousin <harry-arthur at hotmail.fr> wrote:
>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230920/c9ad7d12/attachment.html>
More information about the petsc-users
mailing list