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.
Replies: 2 comments 2 replies
-
|
I'll have a look at this next week. |
Beta Was this translation helpful? Give feedback.
-
|
There are two mistakes in your code:
With these changes, I get convergence in one nonlinear iteration. |
Beta Was this translation helpful? Give feedback.
There are two mistakes in your code:
create_snes_solutiontoupdate_solutions, but watch out that the final line inupdate_solutionsshould readsub_solution_local[:] = x_wrapper_localinstead 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.