<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jun 30, 2017 at 3:45 AM, Maximilian Hartig <span dir="ltr"><<a href="mailto:imilian.hartig@gmail.com" target="_blank">imilian.hartig@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
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.<br>
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?<br></blockquote><div><br></div><div>-snes_fd does a finite difference approximation, so if the two samples are on different sides of your conditional, the answer can be crap.</div><div><br></div><div>You can take a look at this:</div><div><br></div><div> <a href="https://scicomp.stackexchange.com/questions/30/why-is-newtons-method-not-converging">https://scicomp.stackexchange.com/questions/30/why-is-newtons-method-not-converging</a><br></div><div><br></div><div>The SNESVI that we have only deals with bound constraints, but I think you have a complementarity constraint.</div><div>We should implement a nice solver for this, like Mihai Anitescu and Dan Negrut have, but we don't have time right now.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks,<br>
Max</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">http://www.caam.rice.edu/~mk51/</a><br></div></div></div>
</div></div>