<div dir="ltr"><div>Hi Jed,</div><div><br></div><div>Thanks for the information.</div><div><br></div><div>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).</div><div><br></div><div>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.<br></div><div><br></div><div>Regards,</div><div>Francesc.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 17, 2021 at 5:49 PM Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Francesc Levrero-Florencio <<a href="mailto:f.levrero-florencio@onscale.com" target="_blank">f.levrero-florencio@onscale.com</a>> writes:<br>
<br>
> Hi Barry,<br>
><br>
> I believe that what you are referring to is what Jed is referring to in<br>
> this thread, am I right?<br>
> <a href="https://scicomp.stackexchange.com/questions/3298/appropriate-space-for-weak-solutions-to-an-elliptical-pde-with-mixed-inhomogeneo/3300#3300" rel="noreferrer" target="_blank">https://scicomp.stackexchange.com/questions/3298/appropriate-space-for-weak-solutions-to-an-elliptical-pde-with-mixed-inhomogeneo/3300#3300</a><br>
<br>
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?<br>
<br>
Also note that line searches can prevent a rootfinding method from converging, as in this example.<br>
<br>
<a href="https://scicomp.stackexchange.com/a/2446/119" rel="noreferrer" target="_blank">https://scicomp.stackexchange.com/a/2446/119</a><br>
<br>
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.<br>
<br>
> We do set the rows/cols of the Jacobian to zero except the diagonal<br>
> component which is set to one, as you mention. I understand that in the<br>
> case of only homogeneous Dirichlet BCs it is generally a good idea to scale<br>
> that diagonal component so that the condition number of the Jacobian<br>
> improves. I assume that what Jed mentions is the inhomogeneous Dirichlet BC<br>
> version of this scaling, which also acts on the corresponding indices of<br>
> the residual, not just the Jacobian. My question is the following, since<br>
> the case we are encountering problems with is a system with only<br>
> homogeneous Dirichlet BCs, how does it apply? Also, would this scaling<br>
> affect the convergence of the NEWTONLS with "bt" line-search? Without any<br>
> scaling we can solve this example with "basic" (with a very reasonable<br>
> convergence rate), but not with "bt" line-search.<br>
<br>
</blockquote></div>