M81. Stepping between walls without the loss of order¶
Package: C18. The exponential scheme lost its order where what is stepped does not fit the walls: where a value other than zero is held on a face, and where the stepped term of an unknown that is held at zero, or its slope at a wall without flux, is not zero there. It keeps its order now, between walls, on round domains and on regions.
What was found¶
The loss had two causes, and each needed its own remedy.
The scheme. The stepping was the exponential Runge–Kutta scheme of Cox and Matthews. Its fourth order holds for an operator that is not stiff, or for a term that is as tame as the solution: on a periodic grid. In the modes of a domain with walls the operator is stiff, and the term does not obey the conditions on the walls. A source does not vanish where the solution is held at zero. The fastest modes are then fed at every stage of a step, the stages are right to a low order alone, and the scheme has the second order: what milestone 78 measured for an unknown that does not diffuse, which reads the stages of the other at every point.
What a wall is given. A value or a flux on a face enters the equation of the modes as a source, as large as the mode is fast. With that stepped beside the term, a scheme of any weights is right to the second degree in time alone, and has the third order where the walls are given something that depends on time. That is what milestone 70 measured, with 1 280 or 2 560 steps where 80 would do.
Decisions¶
D81.1. In modes, the scheme of Hochbruck and Ostermann steps¶
Developer, 2026-11-26.
exponential::Tableau names the scheme. In the modes of a domain,
in_modes::step, it is the scheme of Hochbruck and Ostermann (SIAM J.
Numer. Anal. 43, 2005) with five evaluations of the term: the
conditions on its weights hold for every mode, however fast it decays,
and not in the limit of a slow one alone. A periodic grid and free
space keep the scheme of Cox and Matthews, which has its order there,
and their results are the same bits as before.
The control of the step is the same for both: a step whole and in two halves, and the two combined. A step in modes therefore costs fifteen evaluations where it cost twelve. Where the old scheme kept its order, that is a quarter more work for a step, and the steps are not always fewer: a reaction on a dish that lets nothing through takes 16 % more time. To choose the scheme by whether the term fits the walls was not tried: the planner would have to know the term at the walls for the whole time span.
D81.2. What a wall is given is integrated, not stepped¶
Developer, 2026-11-26.
Where what a boundary is given depends on time (Driven::faces_vary),
it is left out of what is stepped and handed to the scheme as a
function of the time alone. Within a step the scheme replaces it by
the cubic polynomial through its values at the four Gauss points of
the step, and lets the operator act on that exactly, mode by mode, with
the functions \(\varphi_1\) to \(\varphi_4\): as the propagator integrates
a source (decision D65). What it has added to the state by the middle
of the step and by its end is part of every stage, and the term is
stepped for the rest.
Where what a boundary is given does not depend on time it stays in what is stepped, as before: a constant is integrated exactly by any exponential scheme.
The other remedy, to step the unknown without a part that carries the values on the faces, needs a solve for that part at every time at which it is asked for, and leaves a term that does not vanish at the walls either. The integration needs four transforms to the modes in a step, and no solve.
D81.3. Second order in time keeps its scheme, and gets the integration¶
Developer, 2026-11-26.
An equation of second order in time is stepped with a matrix of two by
two for each mode (decision D74.1), by the scheme of Cox and Matthews.
Its order held in every case that was measured, with a term that does
not vanish at a wall as well: a wave does not damp its fast modes, and
what the stiff scheme is for does not arise. What costs it steps is
what a wall is given, and methods::blocked integrates that in the
same way, with the \(\varphi\) functions of the matrices.
What was built¶
exponential::Tableau, with the weights of both schemes inCoefficients, and the integration of aForcing.blocked::Blocks::driven_by, the same integration with matrices.Driven::faces_vary, andin_modes::stepandstep_secondhand what the boundary is given to the scheme where it depends on time.Tests: the order of both schemes on two modes, the weights of the stiff scheme for a term of second degree in time and three operators, a cubic that drives three modes and is integrated exactly, the order in time of a system where the term does not fit the walls and where the walls hold values that decay, and a nonlinear wave between walls that are shaken.
What was measured¶
Steps of equal length on \([0, 1]\) up to the time 1, for the excitable medium of milestone 77 with its sources: \(u\) diffuses, and \(w\) does not. The factor by which the error at the end falls when the step is halved, for 4 to 64 steps:
The walls |
\(u\) before |
\(u\) now |
\(w\) before |
\(w\) now |
|---|---|---|---|---|
hold \(u\) at zero, the term is zero there |
18 to 43 |
21 to 32 |
17 to 38 |
17 to 75 |
hold \(u\) at zero, the term is not zero there |
11 to 18 |
14 to 19 |
3.8 to 4.6 |
18 to 31 |
let nothing through, the slope of the term is zero |
34 to 42 |
28 to 32 |
33 to 37 |
18 to 75 |
let nothing through, the slope is not zero |
8 to 21 |
28 to 58 |
4.5 to 5.6 |
30 to 31 |
With values on the walls that depend on time, for the stiff scheme with what the walls are given stepped, and with it integrated:
The walls |
\(u\) stepped |
\(u\) integrated |
\(w\) stepped |
\(w\) integrated |
|---|---|---|---|---|
hold \(u\) at values that decay |
8 to 38 |
33 to 39 |
6 to 9 |
13 to 16 |
hold \(u\) at values that swing |
8 to 9 |
34 to 49 |
8 to 35 |
24 to 45 |
are given a flux that decays |
24 to 38 |
33 to 39 |
8 to 19 |
21 to 24 |
With the planner’s tolerance of \(10^{-10}\):
Problem |
Before |
Now |
|---|---|---|
The pair of milestone 70 with \(u = e^{-t}(1 + x + \sin\pi x)\) held |
1 280 to 2 560 steps, \(5\cdot10^{-8}\) |
80 steps, \(2\cdot10^{-11}\) |
The medium with \(u\) held at zero: \(w\) |
\(2.5\cdot10^{-9}\) |
\(2\cdot10^{-12}\), 40 steps |
The same on the unit disk: \(u\) and \(w\) |
\(10^{-11}\) and \(2\cdot10^{-8}\), 109 steps |
\(10^{-10}\) and \(5\cdot10^{-12}\), 40 steps |
The medium with \(u\) held at values that swing |
640 steps with the stiff scheme alone |
177 steps |
A front of Burgers’ equation on a disk with a hole |
more than 100 steps |
20 steps |
A system on a square, at the tolerances \(10^{-4}\), \(10^{-6}\), \(10^{-8}\) |
1, 4 and 16 steps |
1, 2 and 8 steps |
A nonlinear wave between walls that are shaken |
1 243 steps |
215 steps |
The pulse of the gallery, at \(10^{-6}\) and \(10^{-10}\) |
320 and 2 100 steps |
293 and 1 549 steps |
On the disk the unknown that is held is right to \(10^{-10}\) where it was right to \(10^{-11}\): the unknown beside it no longer forces steps that are shorter than the tolerance asks for.
What was left¶
The unknown that is held keeps an order between the third and the fourth where what is stepped is not zero at the wall: the factor is 11 to 14 over all recorded times. The conditions of the scheme hold in a weaker form than the fourth order needs there. A scheme of stiff order five is on the page of ideas.
A step is taken three times to control it. An estimate from one pass would save half the evaluations, and is on the page of ideas as well.
A case of the benchmark suite with values on the walls that depend on time.