M73. One driver in time over the modes

Package: P5, the second step of decision D72.1: equations and systems in time on boxes, round domains and shapes are propagated, stepped and recorded by one driver over collocation::Modes. Nothing that a user sees has changed.

What was built

  • The module in_modes. A problem in time on a domain with boundary conditions is, at the points that are solved for, a system of ordinary differential equations that is diagonal in the modes of the domain, with what the boundary is given as one more source. The module holds what follows from that and needs no domain: the forcing, exact propagation of the first and the second order in time, the stepping of any number of unknowns whose coefficients are one state, the unknown at every point from its values at the points that are solved for, the choice of the steps for what depends on time, the instants at which a planner looks, and the note of a plan on its steps.

  • Four paths on it. bounded_evolution and shaped_evolution had propagate, step, choose_steps and their loops of recording as copies of each other, and bounded_system and shaped_system built the same state of all unknowns, each with a function parts of its own. What they hold now is what differs: how what an unknown is given is sampled on a grid or on elements, and the terms that are stepped.

  • One equation is a system of one. The stepping takes a list of unknowns, each with what it is given and its modes. One equation passes a list of one, and the two system paths pass theirs.

The four files are 410 lines shorter, and the driver has 370 with its tests.

Decisions

D73.1. A path says what its unknowns are given, and the driver does the rest

Developer, 2026-11-25.

The trait Driven is what the driver asks of one unknown: the source at every point at a time, what is given on the boundary in the form that the modes take, whether either depends on time, and the constant that is added to every eigenvalue. bounded::Given and shaped_evolution::Given are the two that exist. On a shape the boundary is one array, the first entry of the faces, and that is said once, where the shape implements the trait, and no longer wherever it calls the modes.

The terms that are stepped are a function that the path hands over, from the unknowns at every point to one array for each unknown, with its source in it. That keeps a difference that is real: between walls the source is a part of the compiled term, and on a shape it is sampled by itself and added.

D73.2. What the two planners do differently stays

Developer, 2026-11-25.

Three things looked like copies and are not, and making them one would change plans:

  • Between walls the planner looks at what is given at the start and at the middles of five parts of the time span. On a shape it looks at the end as well. in_modes::instants takes that as an argument.

  • Between walls the steps in time are chosen from what is given on a coarse grid of the box, on a shape from some of the points of the elements and all of the boundary. The choice itself is one function, which takes the sample.

  • The search for a grid, with its tolerances and its rule for a search that gains little, differs between walls, shapes and their systems. It is no part of the driver.

D73.3. The second order in time with terms that are stepped is A14

Developer, 2026-11-25.

The review named this step with the words that an equation of second order would run through the rewriting that exists. For a linear equation it does: in_modes::propagate takes the order and the damping. With terms that are stepped it does not yet, and for a reason that is no wiring. The stepping takes one number for each mode, its eigenvalue. An equation of second order is the unknown and its rate of change, which the operator couples, a matrix of two by two for each mode. Periodic systems have such matrices, one for each wave, in coupled_stepping. The modes do not. To give the driver that block is new numerics, with a solution to verify it against and pages for users: it is package A14. What this milestone changes for it is where it is written: once, and a region gets it with the box.

What was measured

Nothing may change. Twelve problems in time were solved by the package of main and by that of this milestone, on one thread, and the bytes of their solutions, their diagnostics, the notes and the method of their plans were hashed. Between walls: heat, heat with a wall that is heated in turns and a source that varies, a damped wave with a source, Burgers’ equation with a wall that moves, and two unknowns with different conditions. On a disk: a reaction, and two unknowns. On a region: heat, a wave with a rim that moves, heat with a source and a rim that vary, a reaction with a drift, and two unknowns. All twelve hashes agree, and so do the twelve of milestone 72.

What was left

  • Modes::differentiate still panics for every domain but a box, and its callers ask differentiates first. Derivatives of a field in the modes of a round domain are A15, which ends the question.

  • evolution has an Advance of its own, with the terms that are stepped inside, and system builds one to reuse a check. They go with the Fourier waves (P6).

  • How many times a solution is recorded by default is computed in four places from one budget, two of them in the paths of this milestone and two on Fourier grids. It goes with P6 as well.

  • The two system paths read their problems with two functions classify that differ in the conditions alone, and compile their terms in two ways, one of which takes arrays. That is reading, and P7.