[petsc-users] SNESSetFunctionDomainError
Barry Smith
bsmith at mcs.anl.gov
Sun Aug 31 22:40:01 CDT 2014
We don’t currently have the concept of “matrix-vector product failed due to funky thing like domain error” therefor end the current linear solve and also the nonlinear solve but without an error condition.
I’m open to any suggestions, but not comfortable with reorganizing PETSc errors as exceptions that can be “handled” though I suppose even that could be revisited.
Barry
On Aug 31, 2014, at 10:32 PM, Derek Gaston <friedmud at gmail.com> wrote:
> On Sun, Aug 24, 2014 at 11:45 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> What are your current needs? Do you want the program to just end in this case or do you want some kind of recovery when the matrix-free multiply causes a domain error?
>
> Barry
>
> Sorry it took me a while to get back... and I really appreciate al of the discussion surrounding this issue!
>
> Currently what I need is for everything about the nonlinear solve (which is typically JFNK) to stop - but for the program to _not_ exit. In particular I need to never run another residual evaluation for this nonlinear solve (because something made it into an invalid state).
>
> As a workaround I have tried returning various "diverged" statuses in my linear and nonlinear convergence checks... but it still has a pesky problem where there are a couple more residual evaluations at the "end" of the nonlinear solve.
>
> I may be able to work around that... but if there was any way that I could do a "snes->stop = true;" and have the whole thing just STOP (immediately, with no questions asked).... that would be cool :-)
>
> Thanks!
>
> Derek
>
More information about the petsc-users
mailing list