<div dir="ltr">It appears that SNESConvergedDefault() sets snes->ttol here <div><a href="https://bitbucket.org/petsc/petsc/src/40bc6eb114e6a8e7f27fd216b5c1226efddf337a/src/snes/interface/snesut.c?at=master#cl-462" target="_blank">https://bitbucket.org/petsc/petsc/src/40bc6eb114e6a8e7f27fd216b5c1226efddf337a/src/snes/interface/snesut.c?at=master#cl-462</a><div>
<br><div>That should be harmless, albeit unnecessary, since snes->ttol is also set at the beginning of the solve in SNESSolve_NEWTONLS() (and other SNESSolve_XXX) right before calling the convergence test:</div><div><a href="https://bitbucket.org/petsc/petsc/src/40bc6eb114e6a8e7f27fd216b5c1226efddf337a/src/snes/impls/ls/ls.c?at=master#cl-202" target="_blank">https://bitbucket.org/petsc/petsc/src/40bc6eb114e6a8e7f27fd216b5c1226efddf337a/src/snes/impls/ls/ls.c?at=master#cl-202</a><br>
</div><div><br></div><div><br></div><div>However, this might make for some fragile code and may confuse the user modeling a custom convergence test on SNESConvergedDefault(). In particular, a local reading of SNESConvergedDefault() creates the impression that it is the convergence monitor that is responsible for setting snes->ttol on the zeroth iteration -- snes->ttol is used outside of SNES, for example, in one of the variants of the EW code (maybe only there). That would require access to SNES internals by user code.</div>
<div><br></div><div>More generally, should this sort of thing be handled everywhere using </div><div>snes->norm_init for consistency and to prevent potential breakage?</div><div>At the very least, should snes->ttol = ... be removed from SNESConvergedDefault()?</div>
<div>Thanks.</div><div>Dmitry.</div><div> </div>
<div><br></div><div> <br><br clear="all"><div><br></div><br></div></div></div></div>