Interface problem from tutorial with SNES solver #14
-
Dear community, I am trying to solve the interface problem in tutorial 3.3 with an SNES solver. I have already tried the linear ksp solver whereas the problem does not converge when I tried to use an SNES solver. The MWE for this problem is attached here:
What I get is something like this:
Thanks for any help! |
Beta Was this translation helpful? Give feedback.
Answered by
francesco-ballarin
Jun 7, 2023
Replies: 2 comments 2 replies
-
I'll have a look at this next week. |
Beta Was this translation helpful? Give feedback.
1 reply
-
There are two mistakes in your code:
With these changes, I get convergence in one nonlinear iteration. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
bbbyyfff
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are two mistakes in your code:
create_snes_solution
toupdate_solutions
, but watch out that the final line inupdate_solutions
should readsub_solution_local[:] = x_wrapper_local
instead of the other way aroundself.update_solutions(x)
at the very beginning of the methodR
, therefore the solution computed in the Newton step is never getting copied intou1, u2, l
.With these changes, I get convergence in one nonlinear iteration.