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

Barry Smith bsmith at mcs.anl.gov
Fri Jun 30 10:14:26 CDT 2017


   What is the output from 

    -snes_monitor -ksp_monitor_true_residual -pc_type lu -ksp_converged_reason -snes_converged_reason


> On 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?
> 
> 
> Thanks,
> Max



More information about the petsc-users mailing list