[petsc-users] -snes_fd for problems with residuals with non-continuous first derivative?

Matthew Knepley knepley at gmail.com
Fri Jun 30 09:51:16 CDT 2017


On Fri, Jun 30, 2017 at 3:45 AM, Maximilian Hartig <imilian.hartig at gmail.com
> wrote:

> Hello,
>
> I’m trying to implement plasticity and have problems getting the Petsc
> SNES to converge. To check if my residual formulation is correct I tried
> running with -snes_fd for an easy example as the Petsc FAQ suggest. I
> cannot seem to get the solver to converge at any cost.
> I already tried to impose bounds on the solution and moved to vinewtonrsls
> as a nonlinear solver. I checked and rechecked my residuals but I do not
> find an error there. I now have the suspicion that the -snes_fd option is
> not made for handling residuals who’s first derivatives are not continuous
> (e.g. have an “if” condition in them for the plasticity/ flow-condition).
> Can you confirm my suspicion? And is there another way to test my residual
> formulation separate from my hand-coded jacobian?
>

-snes_fd does a finite difference approximation, so if the two samples are
on different sides of your conditional, the answer can be crap.

You can take a look at this:


https://scicomp.stackexchange.com/questions/30/why-is-newtons-method-not-converging

The SNESVI that we have only deals with bound constraints, but I think you
have a complementarity constraint.
We should implement a nice solver for this, like Mihai Anitescu and Dan
Negrut have, but we don't have time right now.

  Thanks,

    Matt


> Thanks,
> Max




-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

http://www.caam.rice.edu/~mk51/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170630/2d6341d6/attachment.html>


More information about the petsc-users mailing list