Nonlinear equations on a shape¶
This page explains how pdemagic solves a stationary equation with a nonlinear term on a region of the plane: by Newton’s method, with one direct solve of spectral elements in each step.
Nonlinear equations¶
A stationary equation may have a term that is nonlinear in the unknown,
with a linear operator \(L\) of second order, as the elements take it. It is solved by Newton’s method, as on a periodic box (Newton’s method), with the direct solve of the elements for each of its linear equations.
At an iterate \(u_k\) the nonlinear term is replaced by its tangent. The linear equation that results is solved for the next iterate itself, not for its change:
with the conditions of the problem. The slope \(N'(u_k)\) at the points of the elements is one more coefficient of the unknown itself, which varies. The slope is computed from the formula of \(N\), by differentiating it.
Solved in this way, the new iterate satisfies the linear part of the equation exactly, and what the nonlinear equation lacks at it is known at every point without applying the operator:
The iteration ends when the largest \(|r|\) has fallen to \(10^{-10}\) of the larger of the source and the nonlinear term. From the second step on, a step that does not reduce the residual is halved until it does. If none does, or if a linearized equation has no unique solution, the method says so and asks for another starting value.
Newton’s method starts from zero, or from the starting value that the problem gives. A nonlinear equation can have several solutions, and which one is found depends on the start. For \(\nabla^2 u + e^u = 0\) on the unit disk with \(u = 0\) on the rim, the problem of Bratu, both are known in closed form: from zero the method reaches the lower one in three steps, to \(10^{-11}\), and from \(4\,(1 - r^2)\) the upper one in seven.
The planner solves at one degree after another, as for a linear equation. At each degree Newton’s method starts from the solution at the degree before, carried over element by element, and needs a step or two.
Each step factorizes its matrix anew, so a nonlinear solve costs a few linear ones.
Limits¶
A nonlinear term must be a function of the unknown and the position, without derivatives of the unknown, and must have a derivative: not the magnitude of a complex unknown.