# M38. Terms that are stepped in time on shapes in the plane **Package:** A4, its fifth part: equations of first order in time on a region that curves bound, with terms that are nonlinear or have coefficients that vary. The owner gave the package (decision D33.1). ## What was built - **Stepping in the modes of a shape.** `shaped_evolution.rs` hands the modes of milestone 34 to the exponential stepping of milestone 11 (`methods/exponential.rs`), as boxes do: the Laplacian and the constant are exact, and everything else on the right-hand side is stepped to fourth order with step control. - **A method in the plan**: `element_stepping`, with the degree and the spacing of the elements and the tolerance and the most steps of the stepping. - **Documentation**: sections in the guide to regions and on the method page, and every page that says where terms are stepped (decision D37.1). Verified against exact solutions, from the problem to the solution: logistic growth on a disk without flux, which is the same at every point. A cubic reaction with a source on a square, with the error following the tolerance from $10^{-4}$ to $10^{-9}$. A potential that varies with a rim whose values change in time. The nonlinear Schrödinger equation on a triangle, with the magnitude of a complex unknown. ## What was found - **Nothing in the stepping had to change.** `exponential::advance` takes the eigenvalues and a function that evaluates the terms in the basis of the modes. The terms themselves are a compiled formula in the position, the time and the unknown, evaluated at the points of the elements. - **A step costs products with the matrix of the modes.** Each evaluation of the terms turns the state from modes to points and back. For 913 points that is four fifths of a solve of 1.5 s, for 2 481 points a solve of 18 s. The planner therefore stays below 1 700 points for a problem that is stepped. - **Recorded times hide the tolerance.** With 21 recorded times the steps of the test with a source were short enough at any tolerance. The test records the start and the end alone. ## Decisions ### D38.1. Stepped terms on a shape: the scheme of boxes, on formulas at points *Developer, 2026-11-19.* Decision D34.4 refused terms that must be stepped on a shape, because the compiled terms of boxes are tied to a tensor grid. - **The terms are a formula in the position, the time and the unknown**, compiled once and evaluated at the points of the elements. No second form of the compiled terms of boxes was needed. - **No derivative of the unknown in a stepped term.** It would have to be taken at the points of elements, where it jumps from one element to the next. Such a term is refused with a reason, as on round domains, and is left in package A4. - **First order in time**, as on boxes (package A14 for the second). - **The source and what the boundary contributes are stepped with the terms**, as on boxes: values and slopes on the boundary may depend on time. - **The plan** names the method `element_stepping`, with `degree`, `spacing`, `tolerance` and `max_steps`. A plan with `element_propagator` is refused for such a problem, and the other way round. - **The planner** counts the stepped terms at the initial state with what is given when it chooses the degree, and stays below 1 700 points.