What is the default maxstep value?

How do I find where this default value is set?

From: Barry Smith <bsm...@petsc.dev>
Date: Tuesday, March 7, 2023 at 8:52 AM
To: "Angus, Justin Ray" <ang...@llnl.gov>
Cc: "petsc-dev@mcs.anl.gov" <petsc-dev@mcs.anl.gov>
Subject: Re: [petsc-dev] SNESNEWTONLS




On Mar 7, 2023, at 11:36 AM, Angus, Justin Ray via petsc-dev 
<petsc-dev@mcs.anl.gov> wrote:

Hello,

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.


  1.  How exactly does the backtracking line search use the L2 norm of the 
function to modify the newton step? What is the formula?

   
https://petsc.org/main/src/snes/linesearch/impls/bt/linesearchbt.c.html#SNESLINESEARCHBT<https://urldefense.us/v3/__https:/petsc.org/main/src/snes/linesearch/impls/bt/linesearchbt.c.html*SNESLINESEARCHBT__;Iw!!G2kpM7uM-TzIFchu!gRMzIDCT2gk_bmfyFDMW_2hqc18xUq_eOd-GQOXGkPsHzw_F01t55J_ab98JKVI$>



  1.
  2.  Why is backtracking default? I would think that the basic method, which 
is a standard Newton method, would be default.

   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.







  1.

-Justin


Reply via email to