[petsc-users] Doubt about BT and BASIC NEWTONLS

Jed Brown jed at jedbrown.org
Wed Nov 17 11:49:25 CST 2021


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.



More information about the petsc-users mailing list