[petsc-users] Doubt about BT and BASIC NEWTONLS
Francesc Levrero-Florencio
f.levrero-florencio at onscale.com
Wed Nov 17 15:17:36 CST 2021
Hi Jed,
Thanks for the information.
Yes, we set the rows and cols of the matrix for essential BCs to zero
(except diagonal, to 1). For homogeneous BCs it would be exactly as the
first term you mentioned in the link, and for nonhomogeneous BCs it would
be both terms, but the second one not scale (i.e. alpha set to 1).
I have tried a few of the line searches, "bt" does not work, but "cp" does
progress for a few time steps, with reasonable numbers of Newton iterations
(ends up stalling though). It does look to me that the "bt" line search
seems to "get stuck" on a local minima, while the full Newton, maybe due to
the size of the step, gets to overcome it. I am just a bit "surprised"
because in my experience line searches, particularly of the "bt" kind, tend
to improve, or at least not decrease, the convergence behaviour of the
Newton solver.
Regards,
Francesc.
On Wed, Nov 17, 2021 at 5:49 PM Jed Brown <jed at jedbrown.org> wrote:
> Francesc Levrero-Florencio <f.levrero-florencio at onscale.com> writes:
>
> > Hi Barry,
> >
> > I believe that what you are referring to is what Jed is referring to in
> > this thread, am I right?
> >
> https://scicomp.stackexchange.com/questions/3298/appropriate-space-for-weak-solutions-to-an-elliptical-pde-with-mixed-inhomogeneo/3300#3300
>
> Yeah, that's the scaling. Are you decoupling the interior in the way I
> described, so the matrix columns for essential boundary conditions are also
> zeroed?
>
> Also note that line searches can prevent a rootfinding method from
> converging, as in this example.
>
> https://scicomp.stackexchange.com/a/2446/119
>
> There is -snes_linesearch_type cp ("critical point"), which has a
> surrogate that looks like aWolfe conditions when your rootfinding problem
> happens to be the first order optimality conditions for a minimization
> problem. There's also SNESSetObjective(), if your problem has an explicit
> objective. In practice, cp usually works well if your problem is "almost"
> coming from a minimization principle, and poorly otherwise.
>
> > We do set the rows/cols of the Jacobian to zero except the diagonal
> > component which is set to one, as you mention. I understand that in the
> > case of only homogeneous Dirichlet BCs it is generally a good idea to
> scale
> > that diagonal component so that the condition number of the Jacobian
> > improves. I assume that what Jed mentions is the inhomogeneous Dirichlet
> BC
> > version of this scaling, which also acts on the corresponding indices of
> > the residual, not just the Jacobian. My question is the following, since
> > the case we are encountering problems with is a system with only
> > homogeneous Dirichlet BCs, how does it apply? Also, would this scaling
> > affect the convergence of the NEWTONLS with "bt" line-search? Without any
> > scaling we can solve this example with "basic" (with a very reasonable
> > convergence rate), but not with "bt" line-search.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20211117/3c4ff687/attachment-0001.html>
More information about the petsc-users
mailing list