[petsc-users] Question about NewtonTR / Inexact Newton with piecewise continuous functions
Barry Smith
bsmith at petsc.dev
Sun Aug 24 19:34:38 CDT 2025
"my problem involves nonlinear constraints". Do you mean that you have nonlinear inequality constraints on certain variables (SNESVI only handles bound inequality constraints) so cannot use SNESVI? How do you handle such constraints within SNES then? Is handling them what introduces the discontinuous nature of your SNES?
Barry
Please do not cross list to both petsc-maint and petsc-users. The questions will be answered the same way if submitted to either list.
> On Aug 24, 2025, at 8:16 PM, Ali ALI AHMAD <ali.ali_ahmad at utt.fr> wrote:
>
> Hello,
>
> I am currently working with PETSc to solve a nonlinear system. My function is piecewise continuous (so it can be discontinuous), and its derivative (Jacobian) is also piecewise continuous.
>
> I implemented the residual and also compute the Jacobian analytically.
>
> When the discontinuities are small, both Inexact Newton and NewtonTR (with scaled Newton direction) converge without problem.
>
> However, for test cases with larger discontinuities, sometimes the solver converges, but in other cases it fails to converge.
>
> I initially tried <vinewtonssls,vinewtonrsls> , but I cannot use them in my case, because my problem involves nonlinear constraints.
>
> So my question is: how does PETSc handle such situations internally (piecewise continuous objective/residual functions)?
> And is there a recommended strategy within PETSc to deal with nonlinear solvers when and are discontinuous?
>
> I would like to continue working with PETSc and I am looking for a robust method to treat this type of problem.
>
> Thank you very much for your help and suggestions.
>
> Best regards,
> ALI ALI AHMAD
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250824/0a2eba94/attachment.html>
More information about the petsc-users
mailing list