Decisions

What has been decided, by whom, and why. Entries are numbered and never rewritten: a decision is changed by adding a new entry that supersedes the old one.

  • Owner decisions are settled. Reopen them only with the project owner.

  • Developer decisions were made during implementation. They stand unless the owner objects.

This page holds decisions D1 to D79 and is closed. From milestone 30 on, decisions are recorded with the milestone that took them, among the milestones, and are numbered by it: D30.1, D30.2 and so on (decision D30.3). They are as binding as the ones here. The table of dependencies at the end of this page is still kept current.

D1. The core is written in Rust

Owner, 2026-11-18.

All numerical work happens in a Rust core. Other languages bind to it: Python through PyO3, C++ and Julia later through a C ABI crate, and Rust users call the core crate directly.

Why: the project is shaped like a compiler (see D2), and Rust’s enums and pattern matching suit that. Its tooling makes Python wheels and coverage gates straightforward.

Known cost: the HPC ecosystem is thinner than in C++, in particular for GPU portability and MPI bindings. Code that is generic over the dimension is also more limited: arithmetic on a const generic parameter, such as an array of length 2 * D, does not compile on stable Rust 1.100.

The owner reaffirmed the choice on the same day, after a comparison with C++. What decided it: the compiler catches memory errors and data races that a single reviewer would not, enums and derived serialization fit the pipeline, and packaging and coverage are simple. The GPU gap is accepted because kernels are to be generated (see the roadmap), and a Rust core can emit kernels for any backend.

D2. pdemagic is a compiler pipeline

Developer proposal, accepted by the owner, 2026-11-18.

The stages are frontend, problem description, plan, method, solution. They are described in architecture.md.

sympy is a frontend, not the internal representation. Four host languages, the command line and the GUI all have to produce the same thing, so the core owns a language-neutral, serializable problem description with its own expression type.

D3. Ease of use and full control are one mechanism

Developer proposal, accepted by the owner, 2026-11-18.

A planner analyses the problem and fills in a plan: method, grid, solver, parameters. The plan is data. It can be inspected, edited and passed back in. A beginner never looks at it. An expert overrides entries in it. Both run the same code.

D4. Borrowed kernels, own PDE machinery

Owner, 2026-11-18.

  • General numerical kernels come from standard, high-performance libraries: FFT, dense and sparse linear algebra.

  • Everything specific to PDEs is written here: the problem description, the planner, discretizations, grids and meshes, time integration, and the solvers and preconditioners that depend on those.

  • pdemagic is not a wrapper around existing PDE frameworks.

  • The default build works with pip install alone, so default kernels are pure Rust or vendored. Libraries that must be installed separately (FFTW, MKL and the like) are optional backends behind a feature flag.

Every dependency is listed in the table at the end of this file.

D5. Permissive dependencies only, until the license is chosen

Owner (license deferred) and developer (consequence), 2026-11-18.

The license is not decided yet. Until it is, the default build depends only on permissively licensed code (MIT, Apache-2.0, BSD and similar), which keeps every option open. GPL code such as FFTW can only ever be an optional backend.

Nothing is published to PyPI or crates.io before a license exists.

The license is chosen in decision D58. The rule for dependencies stays, now for a reason of its own.

D6. Coverage is a floor, convergence is the proof

Owner (95 %), developer (the rest), 2026-11-18.

  • Line coverage stays at or above 95 %, measured separately for Rust and for Python, and enforced in CI.

  • Coverage does not show that a PDE code is right. Numerical correctness is established against exact solutions, or manufactured solutions, with the convergence order asserted in the test.

D7. First target: Poisson’s equation with vacuum boundary conditions

Owner, 2026-11-18.

The first problem pdemagic must solve well is Poisson’s equation in free space, in all of these settings:

  • A. Mixed free and periodic directions: isolated, wire, slab, bulk.

  • B. A computational domain of a given shape (box, sphere, cylinder) with vacuum outside.

  • C. Material bodies in vacuum: dielectrics or conductors of arbitrary shape.

It must work in 1, 2, 3 and more dimensions. The source can be given as a formula or as data on a grid.

D8. What the first target demands of the architecture

Developer, 2026-11-18.

  • Unbounded domains and conditions at infinity are first-class in the problem description. The user does not approximate them with a large box.

  • A method is not assumed to be “local operator, sparse matrix, linear solve”. The method interface admits Green’s-function and integral methods.

  • “The potential vanishes at infinity” is only well-posed in three dimensions and up. In one and two dimensions the potential of a net charge grows, so the vacuum condition is defined as “the free-space Green’s-function solution” in every dimension.

D9. Two problems the design is checked against

Owner (the problems), developer (the consequence), 2026-11-18.

The Einstein field equations and the Kohn–Sham equations are implemented late but constrain the problem description from the start. It must be able to express tensor-valued unknowns with index symmetries, constraint equations, eigenproblems and nonlocal (integral) terms. Check every extension of the problem description against these two.

D10. pdemagic is independent of findiff

Owner, 2026-11-18.

No shared code and no dependency in either direction.

D11. One developer, a pull request per milestone

Owner, 2026-11-18.

The project is planned over years with a single developer. Each milestone is built on its own branch and reviewed by the owner in one pull request. Pull requests are merged with a merge commit, which keeps the individual commits. The process is described in workflow.md.

D12. No commit mentions Claude

Owner, 2026-11-18.

No commit may mention Claude or Anthropic: not in the message, not in a trailer, not as author or committer. The same holds for branch names, tags, and pull request titles and descriptions, because GitHub copies those into merge commits. Commits are authored under the owner’s identity.

The rule covers commit metadata only. Files in the tree may use the name, which is why CLAUDE.md exists.

It is enforced by a commit-msg hook and by CI.

The working environment signs commits with its own key. The owner accepts that GitHub may show such commits as unverified.

D13. The repository is the project’s memory

Developer, 2026-11-18.

Every working session starts from a fresh clone and knows nothing of earlier sessions. Decisions, the roadmap and the conventions therefore live in this directory and are kept current as part of every milestone.

D14. Tooling

Developer, 2026-11-18.

Concern

Choice

Rust toolchain

pinned in rust-toolchain.toml, edition 2024

Python

3.11 and newer

Python build

maturin, with uv managing the environment

Tests

cargo test, pytest

Coverage

cargo-llvm-cov, coverage.py

Lint and format

rustfmt, clippy, ruff

Documentation

Sphinx with MyST Markdown and the Furo theme

CI

GitHub Actions on Linux

CI runs on Linux only, with one Python version (pinned in .python-version), for now. The repository is private, and macOS and Windows runners consume the free minutes ten and two times as fast. A matrix over platforms and Python versions is added when the first numerical code lands or the repository becomes public, whichever comes first.

D15. Systems of equations, including mixed ones

Owner, 2026-11-18.

pdemagic handles sets of coupled equations, not only single equations, and the equations in a set may differ in kind. “Mixed” is read as:

  • different types in one system, for example an elliptic constraint coupled to a parabolic or hyperbolic evolution equation;

  • PDEs coupled to ordinary differential equations or algebraic constraints;

  • equations that live on different domains, for example a bulk equation coupled to one on a surface.

Consequences: the problem description holds a list of equations over a list of unknowns from the first version on, each unknown with its own domain. The planner classifies the system block by block, not as a whole, and a plan may assign different methods to different blocks.

D16. Free-space Poisson by FFT with a truncated Green’s function

Developer, 2026-11-18.

Poisson’s equation in free space on a uniform box grid is solved by the method of Vico, Greengard and Ferrando: convolution with the Green’s function truncated beyond the box diagonal, evaluated by zero-padded FFTs. It is spectrally accurate for smooth sources and needs no boundary values. The method is described in docs/methods/fourier-poisson.md.

Each solve pads to the full period and multiplies by the closed-form kernel. Precomputing the kernel on a grid of twice the size, which makes repeated solves cheaper, is left for when benchmarks ask for it.

D17. Uniform grids include both end points and are row-major

Developer, 2026-11-18.

A uniform grid runs from lower to upper along each axis with both ends included, like numpy.linspace. Fields are stored row-major, the last axis varying fastest, which is numpy’s default and makes the exchange with Python free of copies or transposes. Periodic axes, which leave the upper end out, will be a property of the axis when they arrive.

D18. Planner defaults for free-space Poisson problems

Developer, 2026-11-18.

  • The box is found by sampling: doubled until the source is below 1e-12 of its maximum on the faces, then tightened.

  • The grid is the coarsest of 16, 24, 32, 48, 64, 96 and 128 points along the longest side on which the spectrum of the source is below 1e-10 of its maximum in the upper third of the frequency range.

  • Automatic grids are limited to 2e7 points of the padded transform.

The spectral criterion is deliberately conservative. Both criteria are also measured on every solve and reported as diagnostics, so a user who overrides the plan still sees whether the result can be trusted.

The search for the box is a heuristic and can miss narrow sources far from the origin. It fails loudly, never silently.

D19. Problems and plans cross language boundaries as JSON

Developer, 2026-11-18.

A frontend hands the core a problem as JSON and gets the plan back as JSON. Fields cross as arrays. The Python Plan is a generic wrapper around that data with attribute access. It has no class per method and no knowledge of what a plan may contain.

Why: every new method or option then exists in one place, the core. Frontends in four languages do not have to mirror it. Validation happens in the core.

D20. Symbols are coordinates; there are no parameters yet

Developer, 2026-11-18.

Every symbol in an equation must be a coordinate of the domain. A symbol such as a width sigma must be replaced by a number before the problem is built. Named parameters, with values supplied at solve time, come when a use case needs them.

D21. Lints and build profile

Developer, 2026-11-18.

  • Clippy’s pedantic lints are on, except the four that flag conversions between integers and floats, which numerical code does constantly.

  • Unsafe code is denied. A module that needs it must allow it locally and say why.

  • Dependencies are compiled with optimizations even in development builds, because the tests run real solves and an unoptimized FFT would dominate them.

D22. Free space in any dimension

Developer, 2026-11-18.

The free-space method works in any number of dimensions. Only the truncated transform of the Green’s function depends on the dimension. It is elementary in one dimension and uses Bessel functions otherwise, which come from libm.

In one and two dimensions the vacuum condition is the convolution with −|x|/2 and −ln(r)/(2π) (decision D8). The logarithm makes the two-dimensional potential depend on the unit of length, which the documentation states.

Four and more dimensions are supported by the method but limited by memory: the padded transform has 81 times as many points as the grid in four dimensions.

D23. Data fields are declared in the problem; their values travel apart

Developer, 2026-11-18.

A term of an equation can be a field given as data. The problem description declares the field by name and grid. The values are not part of the description: they are passed to the solve as arrays. The description therefore stays small and serializable.

A source that reads data is solved on the grid of the data. A plan with another grid is rejected, and so are data fields on different grids in one equation. Resampling comes when a use case needs it.

In the Python frontend an undefined function is a data field if values are given for it, and an unknown otherwise.

D24. Benchmarks without a framework, outside CI

Developer, 2026-11-18.

The benchmarks are a plain program in crates/pdemagic/benches that times each case a few times. It adds no dependency. CI compiles it but does not run it, because timings on shared runners are noise. Baselines are recorded in docs/dev/benchmarks.md, with the machine they were measured on.

D25. One Fourier method for free, periodic and mixed directions

Developer, 2026-11-18.

Periodic directions are handled by the same method as free ones, now called fourier. A Fourier series along the periodic directions leaves a screened Poisson problem per wave vector in the free directions. Its Green’s function is truncated like the free one, with closed-form transforms for one, two and three free dimensions. The modified Bessel functions the wire needs are computed in the method itself, since libm does not have them.

Truncating the screened kernel matters. Its tail decays over the length of a period, and periodizing it without truncation would limit the accuracy to a few digits.

Periodic directions together with more than three free ones are rejected.

D26. A fully periodic source is neutralized

Developer, 2026-11-18.

A Poisson problem that is periodic in every direction has a solution only for a source with zero mean. pdemagic drops the mean of the source, returns the solution with zero mean, and reports the dropped value in the diagnostics.

Why not an error: sources that come from data are never neutral to the last bit, and dropping the mean is the established convention (a uniform neutralizing background). The diagnostic keeps it visible.

D27. Periodic grids and domains

Developer, 2026-11-18.

  • An axis of the domain is unbounded or periodic with a given period. The vacuum condition applies along the unbounded axes. A domain that is periodic in every direction needs no condition.

  • Along a periodic axis a grid holds the period in lower and upper and leaves out the upper end. A plan or a data field whose grid does not match the periodicity and the period of the domain is rejected.

  • In Python, Space(x, y, z, periodic={x: (0, 2)}) is the general domain and FreeSpace its special case without periodic coordinates.

  • Periodic cells are rectangular. Skewed cells, as crystals need them, are not supported yet.

D28. Operators are coordinate-free; the domain has a coordinate system

Developer, 2026-11-18.

The problem description has a Laplacian operator of its own, next to partial derivatives. A domain names its coordinate system (Cartesian, polar, spherical), and the operator takes its meaning from it.

Why: in curvilinear coordinates a Laplacian spelled out in derivatives has variable coefficients, and recognising it again would take a computer algebra system in the core. It is also what a physicist writes. Gradient, divergence and curl will follow the same pattern when vector equations arrive.

Consequences:

  • In Cartesian coordinates both spellings are accepted. In polar and spherical coordinates only the operator is.

  • In Python, pm.laplacian(u) returns the operator. With explicit coordinates, pm.laplacian(f, x, y, z), it still returns the Cartesian sum of second derivatives. The Laplacian of a formula is evaluated by the frontend in the coordinates of the domain before the problem reaches the core.

D29. Disks and balls by angular harmonics and radial Green’s functions

Developer, 2026-11-18.

A disk or a ball with vacuum outside is solved by expanding in angular harmonics and integrating each coefficient against the separated Green’s function along the radius. The vacuum condition is exact by construction, with nothing imposed on the surface. The method is described in docs/methods/harmonics-poisson.md.

The alternative, a boundary value problem per harmonic with the exact condition u′ + (l+1)·u/R = 0 on the surface, was not taken: it needs a treatment of the coordinate singularity at the centre and a linear solve, where the integral needs neither.

The Legendre machinery (Gauss–Legendre rules, associated Legendre functions) is written here. It is small, and no permissively licensed Rust crate offers a spherical harmonic transform.

D30. Grids are tensor products with a point rule per axis

Developer, 2026-11-18.

The grid type, formerly UniformGrid, is now Grid: a tensor product in coordinate space with a rule per axis that places the points. The rules are uniform, Gauss, and Gauss in the cosine of a polar angle. Plans keep their flat form (grid.lower, grid.upper, grid.shape), with grid.rules added where an axis is not uniform.

Frontends get the points of a grid from the core and do not recompute them.

D31. The roadmap after milestone 3

Developer, 2026-11-18.

Setting B of decision D7 is split by what the shapes demand:

  • Boxes with a dictated grid are covered by array sources (milestone 2).

  • Disks and balls separate, and are milestone 4.

  • Finite cylinders do not separate outside. They need a local discretization inside and boundary values from the Green’s function, and with them the first finite differences and linear solvers. They are milestone 5.

Material bodies, setting C, move to milestone 6.

D32. Cylinders by surface values and finite differences

Developer, 2026-11-18.

A finite cylinder with vacuum outside is solved in two steps: the solution on the surface from the Green’s function integral over the source, then a boundary value problem inside by second-order finite differences, solved directly per azimuthal order (sine transform along the axis, tridiagonal solve along the radius). The method is described in docs/methods/cylinder-poisson.md.

It is second-order accurate. That is a deliberate first step: it is the classic method, it is simple enough to verify thoroughly, and it brings the first local discretization. A spectral treatment of the radius and the axis is the known way to more digits and is not started.

Two alternatives were set aside. Embedding the cylinder in a Cartesian box for the Fourier method would lose accuracy at the edge of a source that reaches the surface. A boundary integral with a surface charge needs singular quadrature on the surface.

The kernel between two rings is sampled along the angle as finely as its peak demands, independently of the angular grid of the solution. A first version used the solution’s grid and did not converge.

D33. The planner does not estimate the error of a second-order method

Developer, 2026-11-18.

For the spectral methods the planner picks the coarsest grid that resolves the source, which the spectrum shows. A second-order method has no such signal. For cylinders the planner therefore uses a fixed default of 48 cells along the longer side, says in the plan’s notes that the method is second order, and leaves refinement to grid.shape.

An error estimate from two grids would let the planner meet a tolerance. It doubles the cost and is left until a user-facing accuracy target exists.

D34. Dielectric bodies by iteration on the vacuum solver

Developer, 2026-11-18.

A permittivity that varies in space is handled by an iteration on the effective source, the source that gives the same potential in vacuum, solved by GMRES with the Fourier method inside every step. The method is described in docs/methods/dielectric-poisson.md. Since milestone 22 it is a special case of the method of decision D71, and the page is docs/methods/varying-coefficients.md.

Why this and not a discretization of the operator: the Fourier method already treats free and periodic directions exactly, and this formulation inherits that. It needs no mesh and stays spectrally accurate for smooth bodies.

GMRES is written here. It is the solver layer on top of the kernels, which decision D4 assigns to pdemagic, and it needs no matrix.

The limits are part of the decision: the permittivity must be smooth on the scale of the grid, and conductors are out of reach. Those need a mesh and are milestone 7.

D35. Gradient and divergence in the problem description

Developer, 2026-11-18.

The problem description has gradient and divergence operators, following decision D28. Only one combination is understood so far, ∇·(ε ∇u) with a coefficient free of unknowns. The Laplacian is the case ε = 1, and the linear form of an equation stores both as one kind of term.

In Python they are pm.grad and pm.div.

D36. A failed iteration is an error

Developer, 2026-11-18.

If an iteration does not reach its tolerance, the solve fails with an error of its own kind (ConvergenceError in Python) and returns no result. A result that silently misses its tolerance would be worse than none. The tolerance and the number of steps are entries of the plan, so the user who wants a looser result asks for it.

D37. Development builds are lightly optimized

Developer, 2026-11-18.

Development and test builds of pdemagic itself use optimization level 1, in addition to the fully optimized dependencies of decision D21. Without it the iterative tests took minutes. With it the whole Rust suite runs in seconds. Overflow checks and debug assertions stay on.

D38. The roadmap after milestone 5

Developer, 2026-11-18.

Setting C of decision D7, material bodies in vacuum, is split like setting B:

  • Dielectric bodies given by a smooth permittivity are milestone 6.

  • Conductors and bodies with sharp surfaces need unstructured meshes, finite elements and a coupling to the exterior. They are milestone 7, and bring the decisions that come with a mesh: how a body is described, and which sparse linear algebra library to use.

D39. Bodies are meshes supplied by the user or shapes meshed here; faer; boundary elements

Owner, 2026-11-18.

The three questions that the roadmap left open for milestone 7, as answered by the owner:

  1. A body is described by a surface mesh that the user supplies, and pdemagic also provides built-in shapes that it meshes itself. Both from the start.

  2. Linear algebra comes from the faer crate (MIT), in line with decision D4.

  3. The exterior is treated by boundary elements, which keep the vacuum condition exact. No truncated exterior with an approximate condition.

D40. Boundary elements alone, on surface meshes

Developer, 2026-11-18.

Milestone 7 uses boundary elements and no finite elements. Conductors and dielectrics of constant permittivity change the potential only through the charge on their surfaces, so a surface mesh is all they need, and the free charge is handled by the Fourier method on the grid. Finite elements become necessary only for a permittivity that varies inside a sharp-surfaced body. They are not built until a problem asks for them, and with them come volume meshes.

Consequences:

  • A body is a closed surface: one of the shapes sphere, ellipsoid, box and cylinder, or a triangle mesh. A mesh is written out in the problem description, corners and triangles, so that the description stays self-contained and serializable. Reading mesh files is left to the frontends and to the user’s mesh generator.

  • The problem description says what the body is; how finely a shape is divided into triangles is an entry of the plan (panels), like the grid.

  • The discretization is the simplest that is second-order accurate: flat triangles, a constant charge on each, equations at the centres, all integrals in closed form. Shapes are meshed with their exact volume, and the dielectric equations are corrected so that Gauss’s law holds on the mesh. Both were measured to matter: see docs/methods/boundary-poisson.md.

  • The matrix is dense and solved by LU factorization. A sparse library was not needed after all. A fast method for many triangles is listed in the roadmap.

D41. A floating conductor is given its flux

Developer, 2026-11-18.

A conductor is either held at a potential or floats. A floating conductor is specified by the flux of −∇u through its surface, not by a “charge”. The flux is what the equation knows: it equals the charge only for −∇²u = ρ, and differs by a factor for ∇²φ = −4πρ or −∇²φ = ρ/ε₀. pdemagic does not know which convention the user’s equation follows, and naming the quantity after what it is avoids a silent factor. Results report the same quantity for every body.

D42. Free charge inside bodies

Developer, 2026-11-18.

Free charge inside a dielectric body acts with 1/ε of its strength, which is how the description of a dielectric body is read: the coefficient inside the divergence is multiplied by ε there. Free charge inside a conductor is dropped.

The free charge is solved for on the grid, which loses its accuracy if the charge density does not vanish on a surface. This is not an error, because it cannot be told apart from a charge that merely comes close. The solution reports the charge density on the surfaces relative to its peak (source_surface_ratio), in the same spirit as the other diagnostics.

D43. The documentation is published with GitHub Pages

Developer, 2026-11-18, after the owner asked where to read the website.

The documentation website is built from main and published with GitHub Pages on every merge, at https://maroba.github.io/pdemagic/. No version of it is kept for older states: there are no releases yet.

The repository is private, and the owner’s plan allows Pages for it. The published site is readable by anyone who has the address, unlike the repository. It shows the documentation, including the vision, the roadmap and this record, but no source code. Publication starts when the owner sets the source of Pages to GitHub Actions in the repository settings, which is the owner’s consent to it.

D44. The second campaign: time

Owner, 2026-11-18.

After the Poisson campaign the owner chose time-dependent problems as the next campaign, in four milestones proposed by the developer:

  • M8: further stationary equations, which turns the classification from “Poisson” into “a linear operator”;

  • M9: the heat equation;

  • M10: the wave equation;

  • M11: advection and the first nonlinear terms.

Why this and not more Poisson: one equation in many geometries does not test whether the architecture carries other equations. That should show early.

D45. Visualization belongs to pdemagic, in the Python package

Owner asked for it, 2026-11-18; the design is the developer’s.

The owner wants the documentation website to contain good visualizations, and asked whether pdemagic itself should be able to visualize. It should:

  • Plotting is part of the Python package, as methods of the solution. It is not part of the Rust core, which produces numbers.

  • matplotlib is an optional dependency (pdemagic[plot]), so that the basic installation stays small. Its license is permissive.

  • The figures on the website are produced when the documentation is built, from the examples that are shown. A figure can then never disagree with its code.

This is milestone 12, after the time-dependent milestones, so that the plotting interface covers time series from the start and all pages get their figures in one pass.

D46. Which equations the classification reads

Developer, 2026-11-18.

The classification brings an equation to one of three normal forms:

  1. Poisson’s equation −∇·(ε ∇u) = f. It is the only kind that takes a permittivity that varies in space, bodies, or a domain that is not Cartesian.

  2. A screened or weighted Poisson equation γu − Σ aᵢ ∂ᵢ²u = f with aᵢ > 0 and γ ≥ 0, on a Cartesian domain with at least one free direction.

  3. Any linear operator with constant coefficients, on a Cartesian domain that is periodic in every direction.

The split between 2 and 3 follows from what a free direction demands: a Green’s function that singles out one solution. With γ > 0 that is the decaying one, which is unique. With γ = 0 it is the convolution with the free-space Green’s function, as decided in D8 and D16.

Left out on purpose:

  • The Helmholtz equation with free directions. Its solutions oscillate, the physical one obeys a radiation condition, and it is complex. Complex unknowns and the radiation condition come with the wave equation (M10).

  • Operators of higher order with free directions, such as the biharmonic. Their Green’s functions grow at infinity, and no use case has asked what the condition there should be.

On a periodic box an equation without a unique solution is an error, except for the one case that Poisson’s equation already has: the constant is undetermined, and the mean of the source is dropped and reported (D26).

D47. Time in the problem description, the plan and the solution

Developer, 2026-11-18.

  • Problem. Time is not an axis of the domain. A problem that depends on time has a time: the name of the time and the span over which the problem is posed. Initial conditions are conditions like the one at infinity: the unknown, or one of its derivatives in time, has a given value at the start. That value is an expression in the coordinates and data fields. Keeping time apart from space lets every spatial setting that exists (free, periodic, mixed) carry over unchanged, and matches how the methods treat the two: differently.

  • Plan. The times at which the solution is recorded are an entry of the plan, times: a start, an end and a count. They are a choice about the output, like the grid, and can be any part of the time span. The time span itself belongs to the problem.

  • Solution. The values of an unknown are its snapshots on the grid, one recorded time after another. In Python the time is the first axis of the array, so that solution[u][i] is the field at solution.times[i].

  • Python. Problem(..., time=(t, start, end), initial={u: value}). An unknown is written as a function of the coordinates and the time, u(x, y, t).

D48. First order in time by exact propagation

Developer, 2026-11-18.

Equations ∂u/∂t = A u + f with constant coefficients are solved by evaluating the exact solution for every Fourier wave, not by a time-stepping scheme. Without a source that depends on time there is no error in time at all, and no stability limit on anything. A source that depends on time is interpolated in time within steps, and integrated exactly against the propagator. The alternative, a classical stepping scheme, would be less accurate and no simpler here. Stepping schemes come with nonlinear terms (M11), which no propagator handles.

What follows from it:

  • On a periodic box A can be any operator with constant coefficients. With free directions the padding of the transform must hold what leaves the box, which is known for diffusion, drift and decay, and so A is limited to those there.

  • The milestone was planned as “the heat equation”. Drift and decay came with it at no cost, because they are the same formula. Milestone 11 is therefore about nonlinear transport.

  • The planner’s box holds the solution at the end of the time span only to 1e-6 of its maximum, not 1e-12 as for sources. The values are exact wherever the box ends, and a box for 1e-12 would be much larger than what anyone wants to look at.

  • Recorded snapshots are limited to 160 MB by recording fewer times on large grids.

  • An equation whose waves grow without bound in the wave number, like the heat equation backwards, is refused instead of answered with rounding errors.

D49. Waves by the same propagation, and Helmholtz on its own

Developer, 2026-11-18.

Equations of second order in time, ∂²u/∂t² + γ·∂u/∂t = A u + f, are solved like those of first order (D48): each Fourier wave is an oscillator whose state is propagated exactly. Damping and a mass term come with the wave equation at no cost. Waves have a sharp front, so with free directions the padding of the transform is exact.

  • The initial rate of change is an initial condition for the first derivative in time. In Python its key is sympy.Derivative(u, t).

  • An equation of second order in time that is not hyperbolic is refused in the same way as an ill-posed one of first order: by the growth of its waves on the grid. On a grid too coarse to hold fast-growing waves, the solution for the given initial state is still right, and is returned.

  • The Helmholtz equation is not part of this milestone, although D46 and the roadmap had announced it here. It needs a radiation condition, complex unknowns from the core to Python, and three new kernels. That is a milestone of its own size, and has nothing to do with stepping in time. It now stands in the roadmap as a track after the time campaign.

D50. Nonlinear terms by exponential time stepping

Developer, 2026-11-18.

An equation in time is split into summands. Those that are linear in the unknown with constant coefficients form the operator A, which stays exact (D48). All others are the term N: nonlinear ones, linear ones whose coefficients vary, and the source. N is stepped by the exponential Runge–Kutta scheme of fourth order by Cox and Matthews.

  • Why this scheme. The stiffness of A then costs nothing, which is what makes the Korteweg–de Vries equation cheap. A fully implicit scheme would need nonlinear solves, a fully explicit one tiny steps.

  • Step control without a setting. Steps are chosen by comparing a whole step with two halves. The user sets a tolerance or nothing at all. Steps are the time between two recorded times divided by a power of two, so that the coefficients of the scheme can be kept between steps.

  • N is an expression, evaluated in stages. Every derivative in N is one stage, taken in Fourier space, of the unknown or of an expression in it. This is the first place where the core evaluates an expression that contains the unknown. Coefficients that vary come with it at no cost.

  • The 2/3 rule removes the upper third of the wave numbers of N.

  • The planner does not know the solution. It resolves the initial state, with a minimum of 32 points. Whether the grid stayed fine enough is reported after the solve (solution_tail), in the spirit of the other diagnostics. Refining during the solve is left for later.

  • Periodic domains only. With free directions the padding of D48 needs the distance that the solution travels, which is not known for a nonlinear equation.

Along the way the planner’s grids changed in one detail: a periodic axis now gets exactly the number of points of a candidate, where it used to get one less.

D51. How solutions are drawn

Developer, 2026-11-18.

This carries out decision D45.

  • One call. solution.plot() draws what the problem calls for: a line in one dimension, the field in colour in two, a section in three, and for a problem in time either several times at once (lines) or one time (fields). solution.animate() shows the course in time. Both return matplotlib objects, so nothing about a figure is out of reach.

  • Colour has rules, not options. A field of one sign is drawn in one hue from light to dark, with zero receding into the background. A field with both signs is drawn in two hues, blue and red, around a neutral grey at zero. Lines at successive times run through one hue from light to dark, and get a legend. There is no rainbow map and no second axis. Text is never coloured, and axes and grid are thin and grey. The colours are a published palette whose steps were checked for readers with colour vision deficiencies.

  • Light and dark are two themes with their own steps, not one inverted. The website shows each figure in the theme of the page.

  • What is drawn is what was computed, with two exceptions that follow the method: a disk is interpolated between its few grid points by its Fourier series and its Gauss polynomial, which is what the harmonics method takes the field to be, and a section between two planes of the grid is interpolated linearly.

  • Figures in the documentation are drawn by the examples when the website is built, and are not kept in the repository.

  • Not drawn yet: balls and cylinders, bodies, and more than three dimensions. They raise an error that says to take the arrays.

D52. The vision is not part of the website

Owner, 2026-11-18.

The documentation website does not show the vision. VISION.md stays in the repository, where it is the first thing a developer reads, but the website has no page for it and does not link to it. This changes what decision D43 says the published site contains.

D53. The third campaign: systems

Owner, 2026-11-18.

After the time campaign the owner chose systems of equations as the next campaign, in four milestones proposed by the developer:

  • M13: complex unknowns, with the Schrödinger equation as the test;

  • M14: coupled linear systems, with Maxwell’s equations in vacuum;

  • M15: coupled nonlinear systems and mixed ones, in the sense of decision D15: reaction–diffusion, the Gross–Pitaevskii equation, and the Schrödinger equation coupled to Poisson’s;

  • M16: the Helmholtz equation in free space, with the radiation condition.

Why this and not a release, speed or further languages: it widens the set of equations that can be solved the most, and it tests the promise of D15 that a problem is a list of equations from the first version on.

D54. Complex numbers are native to the core

Developer, 2026-11-18.

An unknown is real or complex. Nothing declares which: an unknown is complex if the imaginary unit appears in its equation, its source or its initial state. A real equation with real data has a real solution, so nothing is lost by inferring it.

  • Expressions have the imaginary unit as a constant of its own, and the functions conjugate, re, im and arg besides abs. A compiled expression is evaluated with real or with complex numbers, whichever the caller asks for, by one interpreter that is generic over the two. Real problems run the same machine code as before.

  • Methods that work in Fourier space were complex inside already. They now take and return real or complex fields, by a trait Scalar with the two implementations f64 and Complex64.

  • Solutions hold real or complex values per unknown. In Python the array of a complex unknown has the type complex128.

  • Plots show the magnitude of a complex unknown, or the real or the imaginary part if asked.

The alternative was to split every complex unknown into two real ones and solve a real system. It needs no complex numbers anywhere, but it costs two transforms where one does, it hides from every method that the two parts belong together, and Helmholtz’s equation (M16) cannot be written that way at all: its radiation condition is a choice of a complex Green’s function.

Where complex numbers are handled so far: every problem in time, and stationary equations on periodic boxes. Poisson’s equation and its screened form refuse complex numbers until M16 gives them a complex kernel. Complex arrays are given as two real ones, A + i·B. The error function is known for real arguments only.

num-complex becomes a direct dependency. It was in the tree already, as the complex type of rustfft and of the numpy crate.

D55. Dispersion in free space: padding by the group velocity

Developer, 2026-11-18.

With free directions the transform is padded by the distance the solution travels (D48). For diffusion and drift that distance follows from the coefficients. For the Schrödinger equation it does not: the wave exp(ikx) travels with the group velocity 2k·Im a, so the distance depends on the waves that the initial state and the source contain.

The planner and the solve therefore take the transform of what is given, find the lowest and the highest wave number with an amplitude above 1e-12 of the largest, and pad by the distance those travel. For the box that is shown, the same with 1e-6. A Gaussian wave packet is exact to 1e-15 with this.

  • The bound holds for dispersion of second order, where the group velocity is linear in the wave number. Operators of higher order with free directions stay refused.

  • Data with noise at all wave numbers of its grid travels far. A transform above 2·10⁸ points is refused with a message, instead of exhausting the memory.

  • First derivatives in space must have real coefficients with free directions. An imaginary one makes waves grow.

D56. A system is a matrix of operators, one small matrix per wave

Developer, 2026-11-18.

A problem with several unknowns and as many equations, all linear with constant coefficients, is classified as one block: a matrix of operators. For each Fourier wave that is a small dense matrix, and the methods for one equation carry over with a matrix in place of the symbol (the method page methods/coupled.md).

  • In time, first order. The state holds every unknown, and the rate of change of each one that an equation differentiates twice. The matrix of the highest derivatives in time is inverted once, so that the equations need not be written solved for them, and orders can be mixed. A second equation of second order in time is then nothing special, and one equation would fit too. The path for one equation stays as it is: its closed formulas are faster, and it handles diffusion and dispersion in free space, which a system does not yet.

  • Matrix functions without inverses. The exponential and the functions φ₁ to φ₄ of the matrix of each wave are computed by scaling and squaring from their power series. Formulas with the inverse of the matrix, or with its eigenvectors, fail for the constant wave of every wave equation, where the matrix is singular and defective.

  • faer supplies the kernels: products, LU factorization, determinant, singular values and eigenvalues of the small matrices (decision D4). It has no matrix exponential, so the recurrence above is written here, on top of its products. A second linear algebra library for that one function was not worth it.

  • One block for now. Decision D15 asks for a classification block by block, with a method per block. With one kind of block there is nothing to split yet. That comes with constraints and nonlinear couplings (M15).

D57. With free directions a system must be hyperbolic

Developer, 2026-11-18.

The transform is padded by the distance the solution travels (D48). For a system that distance is the speed of its fastest front times the time span, if it has fronts at all. The speed along an axis is read off the eigenvalues of the matrix of a wave along that axis at two large wave numbers: in a hyperbolic system they grow in proportion to the wave number, ±i·c·k, and the largest c is the speed. It bounds how far the solution gets along that axis whatever the other directions do, because the region that a hyperbolic system reaches is convex.

  • Terms of lower order (mass, damping, couplings without derivatives) do not change the speed, and the two wave numbers separate them out.

  • Before the eigenvalues are taken, the rates in the state are scaled by the wave number. Without that the matrix has entries of very different size, and the eigenvalues lose half their digits.

  • Eigenvalues that grow faster than the wave number mean diffusion or dispersion, which have no front. Such systems are refused with free directions, and so are stationary systems, whose Green’s functions are matrices that do not exist here yet. On periodic boxes both are solved.

D58. GPL-3.0, with a commercial license on request

Owner, 2026-11-18.

pdemagic is licensed under the GNU General Public License, version 3 (GPL-3.0-only). Anyone who wants to build it into software that is not under the GPL can ask the owner for a commercial license. The owner wants to be able to earn money with the project one day, without knowing yet how.

Why this license:

  • It can be undone, a permissive one cannot. The owner of all rights can move from the GPL to a permissive license at any time. What was once published under a permissive license stays so. While the way to earn money is open, the GPL keeps every way open.

  • It fits who uses the project. Research, teaching and in-house scripts are free. A company that ships pdemagic inside a closed product pays for that, as with FFTW and CGAL.

  • Version 3 only, for now. “Or any later version” can still be added. It could not be taken back.

What follows:

  • Dependencies stay permissive. A commercial license can only be given for code whose own licenses allow it. GPL code can still be an optional backend that the commercial license does not cover. This is rule D5, which now has this reason.

  • The owner must hold all rights. Before the first public release the owner clarifies three things: whether the employer has rights in the project; how code written with the help of an AI model stands in copyright; and that later contributors grant the right to license their work commercially, by a contributor agreement.

  • Nothing is published before these are settled. The repository is private.

D59. Nonlinear systems and constraints: one state, stepped

Developer, 2026-11-18.

A system in time is split as one equation is (D50): what is linear in the state with constant coefficients is the matrix B of D56 and stays exact, everything else is the term N and is stepped by the scheme of Cox and Matthews, now with the exponential of a matrix for every wave.

  • Mixed systems, in the sense of D15. An unknown without a derivative in time is fixed by an equation without one. Such a constraint is solved inside every evaluation of N, for the state at hand, by a linear solve per wave. The unknowns it fixes are thereby functions of the state, and the stepping sees an ordinary system. This covers an elliptic equation coupled to an evolution equation, such as Poisson’s with Schrödinger’s, and algebraic constraints. It asks that a constraint is linear in what it fixes, with constant coefficients.

  • The alternative was to treat a constraint as a second block with a method of its own, and to iterate between the blocks in every step. That is what D15 has in mind for blocks that live on different domains or need different discretizations. On one periodic box, with a constraint that the Fourier method inverts exactly, there is nothing to iterate.

  • Second order in time. A nonlinear equation of second order in time is a system of first order for the unknown and its rate, so the sine-Gordon equation needs nothing of its own. One such equation takes the path of systems. The first derivative in time may appear in its nonlinear terms.

  • Too long a step is not an error. A first step over the whole time between two recorded times can overflow. It is rejected and halved like any step that misses the tolerance. Only when the steps cannot be made shorter does the stepping give up.

  • Periodic boxes only, for the reason given in D50.

The term N is compiled as before, in stages. A stage is now a derivative or the solution of the constraints, and a term can read several unknowns and return several values.

D60. The Helmholtz equation: the outgoing solution, by a truncated kernel

Developer, 2026-11-18.

∇²u + k²u = −f with free directions is solved by convolution with the outgoing Green’s function, cut off beyond the box as in D16, whose transform is known in closed form in one, two and three dimensions.

  • The condition at infinity is the one that exists. A problem in free space asks for the solution that its sources alone produce. For Poisson’s equation that is the one that vanishes at infinity, for Helmholtz’s the one that radiates outwards. No new kind of condition enters the problem description. The time dependence is taken as exp(−iωt). The other convention is the complex conjugate.

  • The solution is complex even for a real source. An unknown of a Helmholtz equation with free directions is always complex (D54).

  • No pole in the numbers. The transform of the truncated Green’s function is regular at s = k, but two of its closed forms are quotients of numbers that vanish there. In one and three dimensions they are written through functions that are regular at zero. In two dimensions a polynomial through six values beside the point replaces the quotient close to it.

  • Periodic directions turn the equation, wave by wave, into a Helmholtz equation with a smaller wave number, or into a screened Poisson equation, which already exists. A wave that travels exactly along the periodic directions is refused: its source has no bounded answer.

  • The planner shows the waves. The box holds the source and two wavelengths around it, on a grid with six points per wavelength. Without that a plot would show the source region only, where little of interest happens.

  • Complex sources for Poisson’s equation come with this milestone, as announced in D54: the real and the imaginary part are solved for one after the other. It holds for the Fourier method in Cartesian coordinates without a permittivity that varies and without bodies. The other methods would take the same two solves, and nobody has asked for it.

Left out: a wave number that varies in space or is complex, and bodies. Both need methods that do not exist yet.

D61. The documentation is organised by what a reader came for

Owner (the request) and developer (the structure), 2026-11-18.

The owner found the website unorganised: a first visitor could not tell where to go. It had grown one section per milestone, in the order in which things were built. It is now organised by what a reader wants:

  • To see what this is: the landing page, with one example, a figure, and six ways on.

  • To try it: a short tutorial, one problem from statement to plot.

  • To see what it can do: a gallery of ten problems with their pictures, and a page that says which equations are solved where, and which are not.

  • To do a particular thing: a guide of one page per topic. Every page stands on its own: its examples run from top to bottom without another page, and a test runs them.

  • To know how it works: the method pages, behind an overview that says which method is used when.

  • To look something up: a reference of the Python API, written from the docstrings.

  • To work on it: the developer pages, last.

The README follows the same idea in small: what it is, three figures, one example with what pdemagic decided, what it solves, the status in plain words. Its figures are files in the repository, because GitHub shows a README as it is. scripts/readme-figures.py draws them, for a light and a dark page.

The roadmap is split in two. roadmap.md looks forward: where the project stands, everything that is open, and campaigns that could come next, worked out as far as they can be before they start. history.md keeps the record of the milestones.

sphinx-design joins the tools of the documentation, for the cards on the landing page. It is not part of what users install.

D62. The fourth campaign: boundaries

Owner, 2026-11-18.

After the systems campaign the owner chose campaign A of the roadmap, boundaries, and its first two milestones: linear equations on boxes with boundary conditions (M17), and problems in time there (M18). Round domains with conditions and general shapes follow in the same campaign, each on the owner’s word.

D63. A boundary condition is an equation on a face

Developer, 2026-11-18.

  • Problem. A Cartesian axis with a bounded interval has two faces, one at each end. A face is named by its coordinate and its side. A boundary condition is a condition like the one at infinity and the one at the start of time: an equation that holds on a face, in which the unknowns and their derivatives stand for their values there.

  • Why an equation, and not three numbers. The description is checked against the hardest targets (D9). Systems couple their unknowns on a face, conditions can be nonlinear (radiation), and can hold derivatives along the face. An equation says all of these without a change of form.

  • What is read so far. a·u + b·∂u/∂x = g with constants a and b, which may be complex, and g an expression in the coordinates, the time and data fields. x is the coordinate of the face.

  • The derivative is the one along the coordinate, not along the outward normal. The description then means what it says, and no frontend has to remember a sign convention. The user documentation says what that means at a lower face.

  • Which domains. A box is bounded or periodic along each coordinate. Bounded and free directions together are refused: the condition at infinity between two walls is a different problem. Disks, balls and cylinders keep vacuum outside until milestone A3.

  • Data on a face is a data field like any other, on the grid of the box, and is read where the face is (D23). A field on a face alone would need grids of lower dimension in the description, and is left for later.

  • Python. Box({x: (0, 1), y: (0, 2)}, periodic=[y]) is the domain. Problem(..., boundary=...) takes one equation for all faces, or a mapping from each face (x, 0) to its equation. A mapping from faces was preferred over equations at a point, Eq(u.subs(x, 0), 0), because sympy writes the derivative at a point as a Subs object that few users know, and because the mapping is the description, entry by entry.

  • The pipeline. A problem on a box takes a path of its own, bounded next to analysis, planner and solve, as systems do. Nothing of what the other paths rest on holds on a box: no Green’s function of free space, and no Fourier waves along the bounded coordinates.

D64. Boxes by collocation, in the basis of the modes of each axis

Developer, 2026-11-18.

Linear equations Σ (aᵢ ∂ᵢ² + bᵢ ∂ᵢ) u + c·u = f on a box are solved by collocation at Chebyshev points along the axes with faces, and with Fourier waves along the periodic ones. The conditions on the two faces of an axis are solved for the two end values, which leaves one matrix per axis. In the basis of its eigenvectors, the modes of the axis, the operator is diagonal: the sum of one eigenvalue per axis. The method is described in docs/methods/collocation.md.

Why this one:

  • It is spectral, like everything else in Cartesian coordinates.

  • It is direct: no iteration, no preconditioner, and a cost that is known beforehand.

  • It treats values, derivatives and mixes alike, with complex coefficients too, since the conditions enter as two rows of a matrix.

  • The modes diagonalize the operator in time as well. Milestone 18 propagates heat, waves and the Schrödinger equation exactly in them, as the Fourier methods do in waves.

Not taken:

  • Galerkin methods with polynomial bases that satisfy the conditions (Shen), and the ultraspherical method (Olver, Townsend). Their matrices are sparse and well conditioned, which pays for thousands of points per axis. They need a basis, or a set of rows, per kind of condition, and a solver for matrix equations in more than one dimension. Chebyshev collocation is conditioned well enough for the grids a box of this kind needs: the matrix of eigenvectors has a condition number below ten.

  • Finite differences and finite elements. They come with general shapes (A4), where spectral accuracy is out of reach anyway.

Consequences and choices:

  • The operator must be a sum over the axes. Mixed derivatives are refused, and so are orders above the second, which would take more than one condition per face.

  • One code path, in complex numbers. Matrices and transforms are complex also for a real problem. A real path is a matter for the speed campaign.

  • A guard. With a first derivative that dominates, the eigenvectors are far from orthogonal and the transform loses digits. The condition number of the matrix of eigenvectors is measured, and a problem is refused above 1e8.

  • The planner solves. A source can be trivial where the solution is not: a boundary layer, a singularity at a corner. The planner therefore solves on one candidate after the other and looks at the spectrum of the solution, which is cheap for a direct method. The search ends early at a candidate with at least 64 points that resolves the solution to 1e-6 and gained less than a factor of 30 over the one before: that is the mark of a singularity, and finer grids buy little.

  • A constant that is left open. With the derivative given on every face and no term with the unknown itself, the rule of D26 carries over: the solution with zero mean, and the constant that the source lacks to balance the faces is dropped and reported. Any other eigenvalue zero is a resonance, and an error.

  • Grids. Chebyshev joins the point rules of a grid (D30). Array data is given at the grid points, as in disks and balls.

The eigendecompositions come from faer (D4). No dependency is added.

D65. Time on boxes: the same propagation, in the modes of the box

Developer, 2026-11-18.

An equation in time on a box, ∂u/∂t = A u + f or the same of second order, is at the inner points a system of ordinary differential equations, ∂v/∂t = Ã v + C·g(t) + f(t): the conditions eliminate the values on the faces, and what they are given, g, becomes one more source. In the basis of the modes of D64 that system is diagonal.

  • One propagator. The exact propagation of D48 and D49 needs a basis in which the operator is diagonal, and nothing else. Propagator now holds either the Fourier waves of a padded box or the modes of a box with boundary conditions. Heat, waves and the Schrödinger equation between walls are propagated by the code that propagates them in free space.

  • One stepping. The scheme of D50 is split into its step control, which works on the coefficients in any such basis, and the evaluation of the terms. On a box the terms are evaluated on the grid: the values on the faces from the conditions, derivatives by differentiation matrices along the axes with faces and by FFT along periodic ones. Nonlinear terms are not dealiased there, which the diagnostics would show.

  • Steps for what changes in time. Within a step a source is replaced by the cubic polynomial through four Gauss points in time. On a periodic box only its integral counts, and the error falls with the eighth power of the number of steps. Values on a face drive the fastest modes hardest, and those follow what they are given at each instant: the error falls with the fourth power. The planner therefore asks that the polynomial be right to 1e-10 at the end of each step, where it is furthest from its points. Not taken: points that include the end of the step (Lobatto), which would remove the leading error for the fastest modes but not for those in between, and would give the two bases different rules.

  • The planner solves linear problems in time as well, on each candidate grid, with three recorded times, and looks at the solution at the end. What is given can be trivial where the solution is not: a wall that is heated in turns makes a layer beside it. The search ends early for a solution that is resolved to 1e-4 and gains little, which is the mark of an initial state that does not agree with the conditions: a kink then runs into the box. Problems with terms that are stepped are not solved by the planner, as on periodic boxes.

  • Plan. mode_propagator is the method for linear problems, with the number of steps between two recorded times. Problems that are stepped keep exponential_runge_kutta: the scheme is the same, and the domain says in which basis it runs.

  • Left out. Nonlinear equations of second order in time, which on periodic boxes are stepped as systems. Conditions with a derivative in time, which the condition for a wall without reflection needs.

D66. The fifth campaign: speed

Owner, 2026-11-18.

With boxes done (milestones 17 and 18), the owner chose campaign C of the roadmap, speed, and its first three milestones: measuring (M19), faster transforms (M20), and threads (M21). The first milestone of the release campaign, the rights (B1), is with the owner in the meantime.

D67. Benchmarks are cases with their plans, and profiles are spans

Developer, 2026-11-18.

  • A case is a problem as a user states it, with the plan it is solved with. scripts/benchmark-cases.py states the problems with sympy and writes them as JSON, and benches/suite.rs reads them. The benchmark program then needs no Python and measures the core alone, while the cases stay readable, and are the problems that users have.

  • The plan is stored with the case. A timing then means the same after the planner has learned to choose another grid. The planner is timed on its own.

  • Tracked in the repository. benches/baseline.json holds the timings of the last milestone that recorded them, and --compare prints the timings of the working tree as fractions of them. The tables are in docs/dev/benchmarks.md. The benchmarks stay outside CI (D24).

  • Profiles by spans. The parts of the core that do the heavy work mark themselves with a span, and pdemagic::profile adds up their times while a recording is on. A sampling profiler was not taken as the standard tool: none can be assumed on every machine, and spans name the work in the terms of the project (kernels, transforms, expressions), which is what decides what to do next. A span costs one read of a flag while no recording is on. Anyone can still run a profiler of their choice on the benchmark program.

  • Targets follow from the profiles, and are recorded next to them.

No dependency is added.

D68. Faster kernels, real transforms, and the library’s matrix product

Developer, 2026-11-18.

What milestone 20 did about the profiles of milestone 19, and what it found on the way.

  • Mirror images. The transform of a Green’s function, and what a wave does over a step, depend on the wave vector through the squares of its components. They are evaluated for the waves without a negative frequency and copied to their mirror images: one evaluation in eight in three dimensions, with the same numbers. Propagation factors are reused only where the symbols of the two waves are equal, which they are for an operator without odd derivatives. A table of the kernel over the length of the wave vector was not taken: it would have to be interpolated, and the kernels are exact to rounding today.

  • Real transforms. A real field is transformed to the half of its coefficients that has no negative frequency along the last axis. So far the convolution with a Green’s function uses that: Poisson, screened Poisson, the iteration for a permittivity, and the free charge beside bodies. The one-dimensional real transforms come from realfft, which builds on rustfft (D4). The propagators and the stepping still transform complex to complex.

  • The library’s matrix product on boxes. The transforms to and from the modes of a box are products of a dense matrix with the grid lines. They are now done by faer’s matrix product, which is five to ten times faster than the loops that were there. Real matrices for real problems, which the roadmap had named, were not needed for that and are left.

  • Clearing the vector registers. On processors with AVX-512 the library’s product and its eigendecomposition return with the upper halves of the vector registers in use. Every instruction of ordinary code that follows then waits for them: a plain loop ran 18 times slower, which at first hid the whole gain. vector_state::clear clears the registers after such calls. It is the one module that allows unsafe code (D21): one instruction, checked for at run time, that touches nothing a caller can hold. Not taken: doing without the library’s product, which would have given up most of the gain, and relying on a transform to clear the registers by the way, which works and would break silently.

  • Numbers below the normal range. A strongly damped mode has a factor like exp(−5000). Results below the smallest normal number are no better than zero, and processors take about a hundred times as long over them, in the multiplication and in everything after. The propagation takes such factors and coefficients as zero.

  • Not done. The padded transform of a free direction is about 2.7 times as long as the grid, twenty times as many points in three dimensions. For repeated solves on one grid, as in the iteration, the kernel could be brought to a box of twice the length once and reused, which would cut the transforms by a factor of 2.5. It is the next step for permittivity_3d after threads.

D69. Threads: rayon, loops whose results do not depend on them

Developer, 2026-11-18.

  • rayon runs the heavy loops on all cores: transforms line by line, expressions point by point, kernels and propagation factors wave by wave, the products of matrices with grid lines on boxes, and the potential of triangles at grid points. It is the standard library for this in Rust, permissively licensed, and fits the shape of the work: loops over independent items.

  • The same bits on any number of threads. Every shared loop computes each result from its own inputs alone. One loop needed care: the library’s matrix product rounds differently when a product is cut differently, so a large product is cut by its size alone, never by the number of threads. A test solves every method on one thread and on four and compares the bits.

  • Only large work is shared. Below 32768 values a loop runs where it stands. A grid of 128² points that is stepped thousands of times ran a fifth slower with threads than without.

  • A plan or a solve runs inside the pool, as a whole. A loop that is handed to the pool from a thread outside it waits for a thread of the pool to wake up, every time. Inside the pool, a loop that is not shared costs nothing.

  • The library’s own threads are not used. Its matrix product leaves the vector registers in use (D68), and they must be cleared on the thread that ran it. So the products are shared here, piece by piece, and each piece clears up after itself.

  • How many threads is rayon’s to say: all cores, or what the environment variable RAYON_NUM_THREADS names, or the pool that a caller from Rust installs. A setting in the plan or in the Python package is left for later: the number of threads is a property of the machine and not of the problem, and nothing has asked for it yet.

  • What threads did not give. A factor of 1.2 to 2.5 on four cores for the large cases, not 4. The transforms of padded arrays in three dimensions wait for memory, and parts of every solve are not shared. The benchmarks page says what would help next.

D70. The sixth campaign: coefficients that vary, and nonlinear stationary problems

Owner, 2026-11-18.

With the first three milestones of the speed campaign merged, the owner chose campaign D of the roadmap: stationary equations beyond constant coefficients. Its milestones are linear equations with coefficients that vary (M22), nonlinear stationary equations, the Helmholtz equation in a medium, and coefficients that vary in time-dependent equations with free directions. C4 and C5 of the speed campaign stay open.

D71. Coefficients that vary: one iteration, built on the equation they settle to

Developer, 2026-11-18.

A linear stationary equation Σ cⱼ(x)·Dⱼu = f is solved by GMRES on the effective source s = L₀u, where L₀ has the constant coefficients that the cⱼ settle to. The method is described in docs/methods/varying-coefficients.md.

  • It replaces the iteration of D34, which is its special case. For ∇·(ε ∇u) the new method arrives at the equation that milestone 6 wrote by hand. There is one code path, the method keeps its name fourier_iterative and its settings, and plans from before still run. GMRES stays written here (D34), and now takes complex fields and a starting value.

  • The reference comes from the grid, not from the formula. The value that stands for a coefficient is its mean on the free faces of the box, or its mean over a periodic box. That needs no limits of expressions, and treats formulas and arrays alike. The planner finds the box by sampling, as it does for the source: where a coefficient differs from the value on the faces of the probing box.

  • The equation is divided by the coefficient of its highest derivatives, relative to its reference value. What varies is then of lower order than L₀, and the iteration converges in a number of steps that grows slowly with the contrast: 12, 17 and 21 steps for a permittivity that reaches 5, 20 and 80. Without the division the number of steps grows with the square root of the contrast.

  • In free space the reference is a Poisson or a screened Poisson equation. Only those have a Green’s function here that decays. So a coefficient of any other derivative is taken to fall to zero towards the free faces. If it does not, the effective source does not vanish there, and source_boundary_ratio, which now covers the effective source, says so. A reference that is a Helmholtz equation is refused: it is milestone D3.

  • A reference that vanishes for a wave does not stop the method. With constant coefficients such an equation has no unique solution. With coefficients that vary it usually has one, so the wave passes through the reference solve unchanged and the iteration determines it. Only where the operator itself gives zero for a constant, on a periodic domain, the mean of the solution is fixed at zero and a multiple of the scaling is taken off the source, as for constant coefficients.

  • The grid resolves what the iteration works with: the source and the coefficients divided by the scaling, and not only what is written. 1/ε is less smooth than ε. Milestone 6 had the same rule in the form “resolve ln ε”.

  • The problem description does not change. A coefficient in front of a Laplacian or a divergence may now vary, which the reading of equations refused before.

  • A diagnostic is renamed. permittivity_boundary_excess becomes coefficient_boundary_ratio, and is relative to the largest variation of the coefficient. solution_tail reports the spectrum of the effective source.

Left out: boxes with boundary conditions, disks, balls and cylinders, systems, and a check of the resolution by solving on trial grids.

D72. Nonlinear stationary equations: Newton’s method on the effective source

Developer, 2026-11-19.

A stationary equation L u + N(x, u) = f is solved by Newton’s method. The method is described in docs/methods/newton.md.

  • The unknown stays the effective source s = L₀u of decision D71, and L₀ holds the slope of N where it has settled. In free space the nonlinear term is then its tangent wherever the solution is small, so s lives in the box and nothing is cut off. Each step is a linear equation of the kind of D71, with the same solve for L₀.

  • The slope comes from the expression. The core differentiates N with respect to the unknown, symbol by symbol. That is exact, and it works for every frontend, where a slope from the frontend would not. A difference quotient would need no code for it but costs digits in every step.

  • Only the unknown itself may stand in N. A derivative inside a nonlinear term needs the slope with respect to that derivative, and in free space its far behaviour. That is left for later, and refused with a message.

  • The starting value belongs to the problem, as a condition: of the solutions of the equation, the one that Newton’s method reaches from here. It is not a setting of the method, because it decides what is computed, not how. In Python it is Problem(guess=...). Without one the method starts from zero.

  • How a solve reports (the decision that the roadmap asked for):

    • If it does not converge, it raises NoConvergence (ConvergenceError in Python) and returns nothing, as the linear iteration does. The message says which of three things happened: the steps ran out, no fraction of a step reduced the residual, or the method could not leave its starting value.

    • It cannot know whether there are other solutions. The plan says in its notes that there can be, and from which start this one is found. The diagnostics report the steps and the residual.

    • A solution that is zero because nothing was given, no source and no start, is refused before the solve: the user wants another one.

  • The steps are damped by halving, and each linear equation is solved to four digits only.

  • The planner’s box holds what is given, not the solution, which it does not know. source_boundary_ratio covers the effective source and shows when the nonlinear term reaches beyond the box.

Left out: derivatives in nonlinear terms, systems, boxes with boundary conditions, following a solution along a parameter, and a search for more than one solution.

D73. Waves in a medium: the same iteration, with the outgoing solver inside

Developer, 2026-11-19.

Where the coefficients of an equation settle to a Helmholtz equation, the iteration of D71 solves with the outgoing Green’s function of D60 in every step. For an index of refraction that varies this is the Lippmann–Schwinger equation. Nothing else is new: the reference, the scaling and GMRES are those of D71.

  • Which far behaviour is meant follows from the equation, as for constant coefficients (D60): if the equation far away is a Helmholtz equation, the solution is the outgoing one. It is complex, also for an equation and a source that are written with real numbers, so the solve finds out what the equation is far away before it chooses its numbers.

  • An incoming wave is the user’s to split off. A plane wave is not a source in a box. The unknown is the scattered part, and the incoming wave appears in its source, which lives where the medium is. The guide shows it. A field for incoming waves in the problem description is left until bodies scatter as well.

  • The planner leaves the room of D60 around what is given, and gives the shortest wavelength six points: the one where the coefficient of the unknown is largest, inside the medium.

  • The outgoing convolution is prepared once (helmholtz::Radiator), as the convolution for Poisson’s equation is.

  • Nonlinear equations whose solutions are waves are refused. Newton’s method would run, but nothing verifies it yet.

Left out: a wave number that is complex far away, obstacles with sharp surfaces, and a medium that traps waves so well that the iteration stalls.

D74. In time, with free directions: terms that act in the box

Developer, 2026-11-19.

An equation of first order in time on a domain with free directions takes terms that are linear in the unknown with coefficients that vary, if the coefficients fall to zero away from where they act. They are stepped by the exponential scheme of D50, on the padded transform of D48.

  • Why linear terms and not nonlinear ones. The solution leaves the box. A term can be evaluated on the box alone only if it vanishes outside it, whatever the solution does there. A coefficient that falls to zero guarantees that. A nonlinear term does not.

  • How far the solution travels is what the padding rests on (D48, D55), and a term can add to it. Two cases are known and planned for: a first derivative with the coefficient b adds a velocity of up to max |b|, and a potential in a Schrödinger equation adds what a wave gains when it runs down the whole range of the potential, k² → k² + range/|d|. A coefficient in front of a second derivative changes the spreading itself. It is refused.

  • The far value of a coefficient must be zero. A constant that a coefficient settles to belongs to the part that is propagated exactly, and decides how far the solution travels. The user writes it as a term of its own. Splitting it off automatically, as decision D71 does for stationary equations, is left for later: the classification of an equation in time fixes its transport before any grid exists.

  • Verified against a ring. The same problem on a periodic domain that is long enough to hold all of the solution uses the stepping of D50 unchanged. A packet that meets a barrier and leaves the box agrees with it to 1e-7.

Left out: nonlinear terms, constraints, equations of second order in time and systems with free directions, and coefficients in front of second derivatives.

D75. Next: round domains with boundary conditions, after a follow-up to D4

Owner, 2026-11-19.

With campaign D merged, the owner chose A3 of the roadmap as the next campaign milestone: disks, balls, cylinders and shells with conditions on their surfaces. Before it, the two things that milestone 25 left open are done as a short milestone of their own (M26).

D76. Stepped terms: steady parts are sampled once, far constants are split off

Developer, 2026-11-19.

Two changes to how terms are stepped, both invisible in the problem description.

  • Steady parts. When a term is compiled, the parts of its expressions that depend on neither the time nor the state are found and replaced by fields, which are sampled once per solve. Of a sum or a product, the steady operands together are one part. This holds for every stepped solve: rings, boxes, free space, systems. It changes the order of some products, so results can differ in the last bits from before.

  • Far constants. In an equation in time with free directions, the constant that a coefficient settles to is added to the operator that is propagated exactly, and subtracted from the term that is stepped. This lifts the restriction of D74 that coefficients must fall to zero. The constant is read as D71 reads it: off the faces of the box, by the planner on the box it searches and by the solve on the grid of the plan. Parts of it below 1e-9 of the coefficient count as zero, so that a coefficient that falls to zero is not split by what is left of it on the faces. A constant that changes in time is refused: the operator that is propagated exactly does not depend on time.

  • A coefficient has settled when it is flat towards the faces, not when what is left of it is small on them. On a line the faces are two points, and what is left of a symmetric coefficient vanishes at both by construction, on any interval. The planner of D71 had this flaw. It showed only once a problem had a coefficient on the line and nothing else of the same extent.

D77. Round domains with conditions: faces of the radius, collocation at the Gauss points

Developer, 2026-11-19.

How A3 of the roadmap is done, beginning with disks and rings.

  • A condition on a curved surface is written as on a face of a box (D63): the rim of a disk is the face of its radius, (r, R), and the condition is a·u + b·∂u/∂r = g with constants a and b and a g that may vary along the rim. The derivative is the one along the coordinate, which at the outer rim is the outward normal and at the inner rim of a ring is not. The centre of a disk is no face.

  • Vacuum or conditions. A disk without a condition has vacuum outside, as before (D29). With one it is a bounded domain. A problem cannot ask for both. A ring has two rims and needs a condition on each: it has no vacuum form.

  • One grid for both. A disk with a condition keeps the grid that it has with vacuum outside: Gauss points along the radius. Arrays, plots and Disk.axes then do not depend on what holds on the rim, which the domain does not know when it is made. The price is that the rim is no grid point: the values on it are not part of the solution arrays, and an array for the rim is read off the outermost ring of points.

  • The method. Fourier waves along the angle, and for each wave collocation along the radius, with the rims as further points of the polynomial through the Gauss points. No condition is asked for at the centre: no grid point lies there, and the singular solutions are no polynomials. Chebyshev points from the centre to the rim with a condition at the centre were tried in a prototype and work as well. They would have needed a second grid for the same disk.

  • Modes, as on a box. The matrix along the radius is diagonalised for every wave. With that, a disk offers what a box offers (D64, D65) behind the same interface, collocation::Modes, and the path of problems on boxes carries it without a second copy: classification, the planner that solves on trial grids, exact propagation in time, stepped terms.

  • The operator is a·∇² + c, written with a Laplacian. Derivatives that are written out in polar coordinates have coefficients that vary, and are not recognised.

  • Derivatives in stepped terms are refused on a disk. The derivative of the polynomial along the radius needs the value on the rim, which depends on what is given there at that time. It is left for when a problem asks for it.

A3 is done in parts, one milestone each: disks and rings (M27), balls and spherical shells, cylinders.

D78. Balls and shells: spherical harmonics, and a projection

Developer, 2026-11-19.

The second part of A3. A ball is done as D77 does a disk, with spherical harmonics in place of the waves along the angle.

  • One radial problem per degree. The equation along the radius has the term l(l + 1)/r² and does not depend on m. There is one matrix to diagonalise for each degree l that the grid holds.

  • The grid of the angles is that of the method for vacuum outside (D29), for the reason of D77: one grid for a ball, whatever holds on its surface.

  • Expanding a field is a projection. The grid of a ball has about twice as many points as there are harmonics up to the degree that its polar points resolve. A field on the grid is projected onto those harmonics, exactly for what they hold, and the rest is dropped. On a box and on a disk the expansion is a change of basis that loses nothing. Two places had taken the number of modes for the number of values of a field, and count the values by the grid now.

  • How well a field is resolved is measured in harmonics, not in Legendre polynomials of the cosine of the polar angle: sin θ is resolved by the first harmonics and is no polynomial in cos θ.

  • One module for round domains, methods/round.rs. The disk of D77 and the ball differ in the functions of the angles, in the dimension in the radial equation, and in nothing else.

D79. Cylinders: a disk times an interval, and a grid of their own

Developer, 2026-11-19.

The third part of A3.

  • The method is the product of two that exist. The Laplacian in a cylinder is that of a disk plus the second derivative along the axis. Along the angle and the radius the modes are those of a disk (D77), along the axis those of an axis of a box (D64), and the eigenvalues add up. Both parts are shared with the modules they come from.

  • The faces are the wall, a face of the radius, and the two caps, faces of the axis. A hollow cylinder has an inner wall. A cylinder may be periodic along its axis, and has no caps then.

  • A grid of its own. A disk and a ball keep one grid whatever holds on their surface (D77). A cylinder cannot: with vacuum outside it is solved at cell centres, by a method of second order (D32), and with conditions it needs Gauss points along the radius and the caps among the points of its axis. Cylinder.axes takes the choice, and a problem picks the grid of its data by whether it has boundary conditions. One grid for both would mean a new method for the cylinder with vacuum outside, which is recorded as open.

With this A3 is done. What all three parts leave open is in the roadmap.

Dependencies

Dependency

Role

License

Since

pyo3

Python binding layer

MIT or Apache-2.0

M0

maturin

builds the Python extension

MIT or Apache-2.0

M0

rustfft

one-dimensional FFTs

MIT or Apache-2.0

M1

serde, serde_json

serialization of problems and plans

MIT or Apache-2.0

M1

libm

error function

MIT

M1

num-complex

complex numbers; the type rustfft and numpy use

MIT or Apache-2.0

M13

realfft

one-dimensional FFTs of real data, on top of rustfft

MIT

M20

rayon

threads for the heavy loops

MIT or Apache-2.0

M21

numpy (Rust crate)

hands arrays to Python; brings ndarray

BSD-2-Clause

M1

numpy (Python)

arrays in the Python API

BSD-3-Clause

M1

sympy (Python)

symbolic input in the Python frontend

BSD-3-Clause

M1

faer

dense linear algebra: LU factorization, eigendecompositions since M17, matrix products since M20. Sparse LU factorization since M33, by its feature sparse-linalg

MIT

M7

spade

Delaunay triangulations that keep given edges, and their refinement: the mesh of a shape (decisions D32.6, D33.5)

MIT or Apache-2.0

M33

matplotlib (Python, optional)

plotting: pdemagic[plot]

PSF-based, BSD-compatible

M12

xarray (Python, optional)

solution.to_xarray(): pdemagic[xarray]. It brings pandas (BSD-3-Clause)

Apache-2.0

M50

Development tools (pytest, ruff, Sphinx and so on) are not listed. They are not part of what users install.