<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br><div><br><blockquote type="cite"><div>On Mar 7, 2023, at 11:36 AM, Angus, Justin Ray via petsc-dev <petsc-dev@mcs.anl.gov> wrote:</div><br class="Apple-interchange-newline"><div><meta charset="UTF-8"><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 11pt;">Hello,<o:p></o:p></span></div><div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 11pt;">I’ve been using the default newton line search nonlinear solver in petsc. I recently discovered that the default line search method is bt – backtracking. I have two questions.<o:p></o:p></span></div><div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><ol start="1" type="1" style="margin-bottom: 0in; margin-top: 0in;"><li class="MsoListParagraph" style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 11pt;">How exactly does the backtracking line search use the L2 norm of the function to modify the newton step? What is the formula?</span></li></ol></div></div></blockquote><div><br></div>   <a href="https://petsc.org/main/src/snes/linesearch/impls/bt/linesearchbt.c.html#SNESLINESEARCHBT">https://petsc.org/main/src/snes/linesearch/impls/bt/linesearchbt.c.html#SNESLINESEARCHBT</a></div><div><br><blockquote type="cite"><div><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><ol start="1" type="1" style="margin-bottom: 0in; margin-top: 0in;"><li class="MsoListParagraph" style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 11pt;"><o:p></o:p></span></li><li class="MsoListParagraph" style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 11pt;">Why is backtracking default? I would think that the basic method, which is a standard Newton method, would be default.</span></li></ol></div></div></blockquote><div><br></div>   All SNES Newton line searches use the full Newton step if it satisfies the Wolf conditions (there is some decrease in the function norm) and if the full Newton step is selected there is no nontrivial extra costs from using a line search (since the line search is never done) so there is no reason not to default to using SNESLINESEARCHBT. While using ONLY the full-step there may not convergence for many situations.  Hence our default.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><blockquote type="cite"><div><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><ol start="2" type="1" style="margin-bottom: 0in; margin-top: 0in;"><li class="MsoListParagraph" style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 11pt;"><o:p></o:p></span></li></ol><div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 11pt;"><o:p> </o:p></span></div><div style="margin: 0in; font-size: 12pt; font-family: Calibri, sans-serif;"><span style="font-size: 11pt;">-Justin</span></div></div></div></blockquote></div><br></body></html>