[petsc-dev] Explicitly check for InfOrNan fnorm in SNESSolve_XXX?

Dmitry Karpeyev karpeev at mcs.anl.gov
Mon Sep 23 16:38:10 CDT 2013


Should SNESSolve_NEWTONLS and friends explicitly run the
PetscIsInfOrNanReal check on fnorm before feeding it into
snes->ops->converged?  We do make this explicit check on the initial norm
after all.  Alternatively, should even the initial norm be checked using
snes->ops->converged?

Currently we let the user decide how to deal with an InfOrNan norm after a
SNES iteration, but force a return with SNES_DIVERGED_FNORM_NAN if the
initial norm is crazy.  This is a minor issue, especially since it's hard
to imagine how any reasonable convergence test might return anything other
than SNES_DIVERGED_FNORM_NAN in this case, but it is a potential
inconsistency.

Dmitry.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130923/f45b0463/attachment.html>


More information about the petsc-dev mailing list