[petsc-users] how to catch zero pivot errors underneath SNES

2015-04-08 Thread Ed Bueler
Dear PETSc -- Context: I am solving a not very smooth and very nonlinear problem using SNES. Robustness is an issue but I think there is no theory to help me, and I am stuck mollifying the problem a bit when divergence happens. Thus I deal with the returned divergence reason (i.e.

Re: [petsc-users] how to catch zero pivot errors underneath SNES

2015-04-08 Thread Ed Bueler
PS:I *did* indeed write a kludge for this, namely catching the ierr output from ierr = SNESSolve(...), and then if it equals 71 convert it to a new negative value of SNESConvergedReason and adding a new string DIVERGED_LU_ZERO_PIVOT, because I have other scripts that diagnose parameter study

Re: [petsc-users] how to catch zero pivot errors underneath SNES

2015-04-08 Thread Barry Smith
Ed, This is something that requires some code reorganization. We've always treated the inability to construct a preconditioner as a hard error generating a SETERRQ() regardless of whether the problem came from a numerical issue (such as zero pivot) or bad user input etc. We need