History

What each milestone built, what it found out, and what it left for later. This is the record of how the project got where it is. Where it goes next is on the roadmap.

Every entry describes the project as it was when the milestone was done. Some of what a milestone left for later has been done since: the backlog lists what is still open today.

This page holds milestones 1 to 29 and is closed. From milestone 30 on, each milestone has a record of its own, among the milestones (decision D30.3).

Campaign

Milestones

Decision

Foundations

M0

Poisson’s equation with vacuum boundary conditions

M1 to M7

D7

Time

M8 to M12

D44

Systems

M13 to M16

D53

Boundaries

M17, M18 and M27 to M29

D62, D75

Speed

M19 to M21

D66

Coefficients that vary, and nonlinear stationary problems

M22 to M26

D70

The Poisson campaign

The first target is Poisson’s equation with vacuum boundary conditions (decision D7). Milestones M1 to M7 work through it.

M0. Foundations

The repository skeleton: Rust workspace, Python package, coverage gates, CI, documentation site, and the decision record. No numerics.

M1. First end-to-end solve

A sympy Poisson equation in three-dimensional free space goes in at the Python level, and a verified solution comes out. Every stage of the pipeline exists in its thinnest form.

  • Expression type and problem description, with unbounded domains.

  • sympy frontend.

  • Planner that recognises the problem and emits a plan.

  • Uniform box grid and a field type on it.

  • Method: FFT convolution with the free-space Green’s function.

  • Solution object that carries its plan. A plan can be edited and passed back.

  • Verification: Gaussian charge distributions, which have a closed-form potential, with the convergence order asserted.

The source is a formula in this milestone.

What was built is described in docs/getting-started.md and docs/methods/fourier-poisson.md. Findings that shape later milestones:

  • The planner’s resolution criterion is conservative by about a factor of two in points per axis. Tightening it is a matter for M2’s benchmarks.

  • The interpreted evaluation of the source is the slowest part of planning. It is the first candidate for generated kernels.

M2. Any dimension, any grid, data sources

  • One, two, and four or more dimensions, each with its own free-space kernel.

  • Sources given as data on a grid, exchanged with numpy arrays.

  • Arbitrary grid sizes and anisotropic spacing.

  • Benchmarks, so that later changes are measured against a baseline.

Findings:

  • The planner’s resolution criterion was left as it is. It costs a factor of about eight in points for smooth sources in 3D, and nothing in accuracy. Relaxing it is cheap once a use case shows it matters.

  • Four dimensions work but are confined to coarse grids by the padded transform. The precomputed kernel listed in benchmarks.md is the remedy.

M3. Mixed free and periodic directions

Wire, slab and bulk settings, and fully periodic problems. This completes setting A of decision D7.

Left for later, because no use case asks for it yet: periodic cells that are not rectangular.

M4. Disks and balls with vacuum outside

Polar and spherical coordinates, with a source that fills a disk or a ball and vacuum outside. This milestone brings coordinate systems, the Laplacian as a coordinate-free operator, grids with Gauss points, and the harmonics method, in which the vacuum condition on the surface is exact.

It covers the separable part of setting B. Boxes with a dictated grid are already covered by the array sources of M2.

Left for later: shells and sectors, and array data on grids other than the method’s own.

M5. Cylinders with vacuum outside

A finite cylinder does not separate outside, so the vacuum condition on its surface cannot be built into a Green’s function as for the ball. The plan:

  • cylindrical coordinates;

  • boundary values on the surface from the Green’s function integral over the source;

  • a local discretization inside, which brings the first finite differences and linear solvers.

It completes setting B.

What was built: cylindrical coordinates, a grid of cell centres, the surface integral, and a direct finite-difference solve inside. The method is second-order accurate, unlike the earlier ones. General sparse linear solvers were not needed, because the system inside is solved by a sine transform and tridiagonal solves. They arrive with M6.

M6. Dielectric bodies with a smooth permittivity

The equation ∇·(ε ∇u) = −g with a permittivity that varies in space, solved by an iteration on top of the Fourier method. This milestone brings gradient and divergence operators, a reusable convolver that also returns the gradient of the potential, and GMRES.

It covers the part of setting C that needs no mesh: dielectric bodies whose surface is smooth on the scale of the grid.

M7. Conductors and sharp interfaces

What remains of setting C: conductors, and dielectric bodies with a sharp surface, of arbitrary shape, in three-dimensional free space. The owner settled how bodies are described, which linear algebra library to use, and how the exterior is treated (decision D39).

What was built: bodies in the problem description, as built-in shapes or triangle meshes; surface meshes and the meshing of the shapes; boundary elements for the charge on the surfaces, combined with the Fourier method for the free charge; conductors at a potential and floating conductors; per-body results in the solution. The method is second-order accurate.

It turned out that neither finite elements nor volume meshes nor a sparse solver were needed (decision D40). They wait for a problem that needs them.

It completes setting C and the Poisson campaign.

Left for later:

  • Bodies in periodic settings and in two dimensions.

  • A permittivity that varies inside a sharp-surfaced body, which needs finite elements on a volume mesh, and bodies inside a smooth permittivity.

  • Bodies that touch, and bodies inside other bodies.

  • A fast method for many triangles and fine grids: a tree code or fast multipoles with an iterative solve, in place of the dense matrix.

  • Curved or higher-order elements, for more than second order.

  • A free charge that reaches a surface.

The time campaign

The owner chose time-dependent problems as the second campaign (decision D44). Only the next milestone is planned in detail.

M8. Linear equations with constant coefficients

One equation in many geometries does not show whether the pipeline carries other equations. This milestone turns the classification from “is it Poisson’s equation?” into “which linear operator is it?”.

What was built: linear terms that count Laplacians, an operator type with its symbol, and three kinds of equations in the classification (decision D46). On a periodic box every linear equation with constant coefficients is solved, of any order. With free directions, screened Poisson equations and second derivatives with unequal weights are solved, in free space, wires and slabs. No new method was needed: all of it is the Fourier method.

Left for later:

  • The Helmholtz equation with free directions, which needs a radiation condition and complex unknowns. It comes with the wave equation.

  • Equations of higher order with free directions.

  • These equations in disks, balls and cylinders and around bodies.

M9. The heat equation

The first equation with time. It brings a time and initial conditions into the problem description, recorded times into the plan, and a solution that is a series of snapshots (decision D47).

What was built: equations of first order in time with constant coefficients, solved by exact propagation in Fourier space (decision D48). Besides the heat equation this covers drift and decay, and on a periodic box any operator in space. Sources may depend on time. Free space, periodic boxes, wires and slabs all work.

Left for later:

  • Time-dependent problems in disks, balls and cylinders and around bodies.

  • A source or an initial state that is not smooth, which the planner’s resolution criterion cannot satisfy.

  • Adaptive choice of the steps for a source whose time scale changes.

M10. The wave equation

The second derivative in time, with the conservation of energy as a test.

What was built: equations of second order in time with constant coefficients, by the same exact propagation as the first order (decision D49). Besides the wave equation this covers damping (the telegraph equation) and a mass term (the Klein–Gordon equation), and on a periodic box any operator in space, such as the beam equation. The energy of a wave is conserved to rounding error.

Moved out: the Helmholtz equation with a radiation condition, which brings complex unknowns. It is a track of its own below.

M11. Nonlinear terms

Linear transport came with M9. This milestone is about nonlinear terms, as in Burgers’ equation and reaction–diffusion equations, which need a time-stepping scheme. It is the step towards coupled systems (decision D15).

What was built: equations of first order in time on periodic domains whose right-hand side has terms that are nonlinear or have coefficients that vary. The linear part stays exact, the rest is stepped by an exponential Runge–Kutta scheme of fourth order with automatic step control (decision D50). Burgers’ equation, the Korteweg–de Vries equation and reaction–diffusion equations are verified against exact solutions.

Left for later:

  • Nonlinear equations with free directions, and of second order in time.

  • Refining the grid during the solve, when the solution outgrows it.

  • Nonlinear stationary equations.

M12. Visualization

Plotting as part of the Python package, and figures throughout the documentation website (decision D45).

What was built: solution.plot() and solution.animate() on top of matplotlib, which is an optional dependency, with light and dark themes (decision D51). The website draws its figures from its own examples when it is built.

Left for later:

  • Plots of solutions in balls and cylinders, and of bodies.

  • Figures on the method pages, such as convergence plots.

  • Interactive figures on the website.

The systems campaign

The owner chose systems of equations as the third campaign (decision D53). Only the next milestone is planned in detail.

M13. Complex unknowns

The Schrödinger equation needs complex numbers from the frontend to the solution, and so will Helmholtz’s equation. This milestone makes them native to the core (decision D54), for one unknown.

What was built:

  • The imaginary unit in expressions, with conjugate, re, im and arg, and one interpreter for real and complex values.

  • Complex coefficients in the classification. An unknown is complex if its equation or its data is.

  • The methods in Fourier space for real or complex fields: exact propagation, exponential stepping, and stationary operators on periodic boxes.

  • The Schrödinger equation in free space. How far a wave packet travels depends on its wave numbers, which sets the padding (decision D55).

  • Complex arrays in Python, and plots of the magnitude or of a part.

Verified against the spreading wave packet in one and two dimensions, a coherent state in a harmonic potential, and a soliton of the nonlinear Schrödinger equation.

Left for later:

  • Complex numbers in Poisson’s equation and its screened form (with M16).

  • Complex arrays as data in one piece. They are given as two real arrays.

  • Dispersion of higher order with free directions.

  • A potential with free directions, which needs to know how far a solution travels in it.

M14. Coupled linear systems

Several unknowns coupled by linear equations with constant coefficients, stationary and in time, with Maxwell’s equations in vacuum as the test.

What was built (decisions D56 and D57):

  • The classification of a list of equations into a matrix of operators.

  • For every Fourier wave a small matrix: a linear solve for a stationary system, and the exponential and its relatives for one in time, by scaling and squaring.

  • Equations of first and second order in time in one system, not necessarily solved for their derivatives in time.

  • Free space for hyperbolic systems. The speed of the fastest front along each axis is read off the eigenvalues, and sets the box and the padding.

  • Solutions with several unknowns, real or complex.

Verified against Maxwell’s equations in the plane and in a periodic box in three dimensions, coupled diffusion and coupled Schrödinger equations, and manufactured solutions with sources.

Left for later:

  • Nonlinear couplings and constraints (M15).

  • Stationary systems, diffusion and dispersion with free directions.

  • The classification block by block of decision D15: a problem whose equations fall into independent or one-way coupled groups is still treated as one system.

  • Speed. The matrices of all waves are computed one by one and kept. Maxwell’s equations on a 64³ grid take six seconds.

M15. Coupled nonlinear and mixed systems

Nonlinear terms that couple the unknowns, by exponential stepping, and constraints without a derivative in time next to equations with one.

What was built (decision D59):

  • Exponential time stepping for systems, with the exponential of a matrix for every wave.

  • Constraints: unknowns without a derivative in time, fixed by equations without one, which are solved inside every evaluation of the nonlinear terms.

  • Nonlinear equations of second order in time, as systems of first order.

  • Terms that read several unknowns, and the rate of change of an unknown.

  • The license: GPL-3.0 with a commercial license on request (decision D58).

Verified against a breather of the sine-Gordon equation, a soliton shared between two nonlinear Schrödinger equations, two species that diffuse and react, and a Schrödinger equation coupled to Poisson’s. The Gross–Pitaevskii equation is one complex equation with a nonlinear term, and has been solved since M13.

Left for later:

  • Nonlinear systems and constraints with free directions.

  • Constraints that are nonlinear in the unknown they fix, and nonlinear stationary systems. Both need a nonlinear solver.

  • Blocks on different domains or with different methods (decision D15).

  • Speed: every step evaluates the terms twelve times.

M16. The Helmholtz equation in free space

The radiation condition as a choice of Green’s function, in one, two and three dimensions, and complex numbers in the stationary methods.

What was built (decision D60):

  • The outgoing Green’s functions and the transforms of their truncations, in one to three dimensions.

  • Periodic directions: every wave along them radiates or decays in the free ones.

  • A planner that leaves room for the waves around the source.

  • Complex sources for Poisson’s equation and its screened form.

Verified against the convolution integral by quadrature, and against the wave that a Gaussian source sends out.

Left for later:

  • A wave number that varies in space or is complex.

  • Scattering by bodies.

  • Complex sources with a permittivity that varies, with bodies, and in disks, balls and cylinders.

The boundaries campaign

Bounded domains with conditions on their edge (decision D62).

M17. Boxes with boundary conditions

The first domain with walls, and the first method in Cartesian coordinates that is not a Fourier method.

What was built (decisions D63 and D64):

  • Boundary conditions in the problem description: an equation that holds on a face of the domain. In Python, the domain Box and the argument boundary of a problem.

  • Linear equations of second order with constant coefficients and no mixed derivatives, in any dimension: Laplace, Poisson, screened Poisson, Helmholtz, diffusion with drift. Values, derivatives and mixes on the faces, with complex coefficients too. Boxes that are periodic along some of their axes.

  • The method: collocation at Chebyshev points, solved in the basis of the modes of each axis.

  • A planner that solves on candidate grids and looks at the spectrum of the solution.

  • The solution with zero mean, and the constant that the source lacks, when every face gives the derivative.

  • Chebyshev points as a rule of grids, and arrays at those points.

Verified against exact solutions in one, two and three dimensions, with the spectral rate of convergence asserted.

Findings:

  • The matrix of eigenvectors of the second derivative at Chebyshev points is conditioned very well, with a condition number below ten up to 256 points, for every kind of condition. With a first derivative it degrades quickly once the solution has a boundary layer.

  • The simplest problems are not smooth. −∇²u = 1 with zero on the faces of a square has a singularity in each corner, and converges like a power of the number of points. The planner had to learn to stop.

Left for later:

  • Problems in time on boxes, which is the next milestone.

  • Systems, mixed derivatives, orders above the second, and coefficients that vary, on boxes.

  • Boundary layers.

  • Boxes that are bounded along some coordinates and free along others.

  • Data that is given on a face alone.

  • Conditions that are nonlinear, or that hold derivatives along the face.

M18. Time on boxes

Heat, waves and the Schrödinger equation between walls, and nonlinear equations of first order in time there.

What was built (decision D65):

  • Problems in time on boxes in the classification: first and second order in time, with damping, with the operator in space of milestone 17, and with conditions whose given values may depend on time.

  • Exact propagation in the modes of the box. The propagator of milestones 9 and 10 now takes any basis in which the operator is diagonal.

  • Stepping of terms that are nonlinear or have coefficients that vary, by the scheme of milestone 11, with its step control split from the evaluation of the terms.

  • A planner that solves linear problems in time on candidate grids, and that chooses the steps in time by the error of the interpolation.

Verified against exact solutions: decaying and standing modes, a damped drum with a free edge, a wave that is shaken through a string, a particle in a box, and manufactured solutions for the nonlinear terms.

Findings:

  • Values on a face that change in time reduce the order in time of the linear propagation from eight to four, because they act on the fastest modes. The planner had to choose its steps by another measure than on periodic boxes.

  • An initial state that is zero on the walls can still disagree with them: for the wave equation it must have no curvature there either. Otherwise a kink runs into the box, and the spectrum of the solution falls slowly.

Left for later:

  • Nonlinear equations of second order in time on boxes, and systems.

  • Conditions with a derivative in time: walls that let waves out.

  • Dealiasing of nonlinear terms at Chebyshev points.

The speed campaign

Every method was written to be right, and none to be fast (decision D66).

M19. Measuring

A benchmark for every method, and profiles that say where the time goes.

What was built (decision D67):

  • A suite of 21 cases, one or more per method, each a problem as a user states it with the plan it is solved with. A script writes the cases from sympy, and the benchmark program reads them.

  • Timings of the planner and of the solve, saved as a baseline and compared against it.

  • Spans in the heavy parts of the core, and a profile of any solve from them.

Findings, on one core:

  • The transform of the Green’s function is evaluated wave by wave on the padded box, and takes 58 % of a Poisson solve in three dimensions and 76 % of a Helmholtz solve. It depends on the length of the wave vector alone.

  • The factors by which waves are propagated take half of a wave equation in three dimensions, for the same reason.

  • Where neither dominates, the transforms do: 68 % of the iteration for a permittivity that varies.

  • On boxes, 80 to 90 % goes into multiplying grid lines by dense complex matrices.

  • In stepped problems, the interpreter of expressions takes 40 to 50 %.

The targets for the next two milestones are recorded with the profiles in docs/dev/benchmarks.md.

M20. Kernels, transforms and matrix products

The first milestone that makes anything faster, measured against the baseline of milestone 19.

What was built (decision D68):

  • Kernels and propagation factors evaluated once per wave and its mirror images.

  • Real transforms for the convolution with a Green’s function.

  • The library’s matrix product for the mode transforms of boxes.

  • A module that clears the vector registers after linear algebra, and factors below the normal range of numbers taken as zero.

Results on one core, as fractions of the time before: Poisson in free space 0.37, Helmholtz 0.39, waves in free space 0.57, the iteration for a permittivity 0.52, Poisson in a cube with walls 0.15, heat in a cube 0.19.

Findings:

  • After a product of two matrices by the library, a plain loop ran 18 times slower: the product leaves the upper halves of the vector registers in use on processors with AVX-512, and ordinary code then waits for them. The first measurement of the faster mode transforms showed almost no gain for that reason. It took a profile by instructions, which did not show the time, and an experiment in isolation to find it.

  • The same search found that strongly damped modes produce numbers below the normal range, which are slow to compute with.

  • The timings of small cases scatter by half between runs on this machine. Only the large cases are compared.

Left for later:

  • Real transforms in the propagators and in the stepping.

  • A kernel on a box of twice the grid for repeated solves.

  • Real matrices for the modes of real problems.

M21. Threads

The heavy loops on all cores, with results that do not depend on how many there are.

What was built (decision D69):

  • Transforms, expressions, kernels, propagation factors, matrix products on boxes and the potential of triangles, on the threads of rayon.

  • A rule for what is shared: work on at least 32768 values, inside a pool that the whole plan or solve has moved into.

  • A test that solves every method on one thread and on four and compares the bits of the results.

Results on four cores, as fractions of the time of milestone 20: boundary elements 0.42, Helmholtz 0.56, the iteration for a permittivity 0.62, Poisson in free space 0.70, waves 0.70, boxes 0.77 to 0.88. Since milestone 18 the large cases have fallen to between 0.14 and 0.41 of their time.

Findings:

  • Four cores gave a factor of 1.2 to 2.5, not 4. The transforms of padded arrays in three dimensions wait for memory.

  • Handing a loop to the pool from outside costs more than a small loop does. The first version made mid-sized stepped problems a fifth slower.

  • The test of the bits found that the library’s matrix product rounds differently when it is cut differently.

  • A count of instructions found two costs on boxes that the spans had hidden in “everything else”: a plain product of matrices in the building of the modes, and a cosine per entry of a matrix in the check of the resolution.

Left for later:

  • A setting for the number of threads in the plan or in Python.

  • The small matrices of systems, wave by wave, on several threads.

  • Everything under “Where the time goes now” in the benchmarks.

The campaign for coefficients that vary

Stationary equations beyond constant coefficients (decision D70).

M22. Linear equations with coefficients that vary

Any linear stationary equation whose coefficients vary in space, on periodic domains and with free directions.

What was built (decision D71):

  • A method that replaces the coefficients by the constants they settle to, solves that equation directly, and finds the effective source by GMRES. The equation is first divided by the coefficient of its highest derivatives. It takes real and complex unknowns.

  • GMRES as a module of its own, for real and complex fields.

  • A kind of equation for it in the classification, and a planner that finds the constants and the box by sampling.

  • The iteration for a permittivity of milestone 6 is now this method. Its module is gone, its tests run against the new one.

Verified against manufactured solutions with spectral convergence: a dielectric bump, a potential well in free space, unequal weights, a slab, all three coefficients of an equation of second order varying on a ring, complex coefficients, and against Gauss’s law for a charge in a dielectric sphere.

Findings:

  • The general method is faster than the one it replaces: it asks the reference solve only for the derivatives it needs, three in place of four transforms back per step. The benchmark of milestone 6 takes 0.8 of its time.

  • The planner first chose a coarser grid than before for a permittivity, because it resolved the permittivity and not its inverse. The solution was still right to ten digits, but the rule of milestone 6 was the safer one and came back in general form.

  • A coefficient that falls to zero is not zero on the faces of the box. The first version read a far value of 1e-13·i from an absorbing potential and refused the equation as complex far away.

Left for later:

  • Coefficients that vary on boxes with boundary conditions, in round domains and in systems.

  • A reference that is a Helmholtz equation (milestone D3).

  • The planner checks the resolution of what is given, not of the solution. A check by solving on trial grids would cost a solve each.

  • Each step allocates the transforms it returns. Reusing them would save a part of the fifth of the time that the derivatives take.

M23. Nonlinear stationary equations

Equations with a term that is nonlinear in the unknown, in free space and on periodic domains: the Poisson–Boltzmann equation, ground states.

What was built (decision D72):

  • Newton’s method on the effective source of milestone 22, damped by halving, with each linear step solved by the iteration of that milestone.

  • Expressions that are differentiated with respect to the unknown, for the slope of the nonlinear term.

  • A starting value as a condition of the problem, Problem(guess=...) in Python, and the method fourier_newton in the plan.

Verified against manufactured solutions of the Poisson–Boltzmann equation with spectral convergence, against the ground state √2/cosh x, and on equations with several solutions, where the starting value decides.

Findings:

  • An equation without a source and without a starting value has the solution zero, and the planner had no box for it. It is refused with the advice to give a starting value.

  • On a periodic domain an equation whose unknown appears in derivatives only cannot be started where the slope of the nonlinear term vanishes: the linearized equation leaves the mean open. The method says so.

  • The planner’s box holds the starting value. A ground state reaches further than a Gaussian that starts it, and the diagnostics show it: the effective source is 1e-9 of its maximum on the faces.

Left for later:

  • Derivatives of the unknown in nonlinear terms.

  • A box that follows the solution, and following a solution as a parameter changes.

M24. Waves in a medium

The Helmholtz equation with a wave number that varies in a bounded region: a lens, a smooth obstacle, a well.

What was built (decision D73):

  • A reference solver that radiates: where the coefficients settle to a Helmholtz equation, each step of the iteration of milestone 22 solves with the outgoing Green’s function of milestone 16.

  • The outgoing convolution prepared once for many sources.

  • A planner that leaves room for the waves and resolves the shortest of them, and a solve that turns to complex numbers when the equation radiates.

Verified against the exact solution for a well that does not reflect, 2/cosh²x, with spectral convergence, against a manufactured solution in the plane, and by what a lens does to a plane wave.

Findings:

  • Nothing in the iteration had to change. The method of milestone 22 was built with a reference solver that can be exchanged, and this is the second one for free space.

  • The diagnostic for the resolution of the solution is cautious: for the lens it reports 1e-6 on a grid whose solution agrees with that of twice the resolution to 1e-13.

Left for later:

  • Incoming waves as part of the problem description.

  • A wave number that is complex far away. Obstacles with sharp surfaces.

M25. Coefficients that vary in time, with free directions

Equations of first order in time in free space with terms whose coefficients vary: a potential in the Schrödinger equation, a reaction or a drift that acts in one place.

What was built (decision D74):

  • The exponential stepping on the padded transform of the exact propagation. The terms are evaluated on the box, where their coefficients are.

  • A padding that holds what the terms speed up: by the largest velocity of a drift, and by the range of a potential.

  • A planner that puts the box around where the coefficients differ from zero.

Verified against the bound state of the well −1/cosh²x, against manufactured solutions with a reaction, a drift and a coefficient that depends on time, and against the same problem on a long ring for a packet that meets a barrier and leaves the box.

Findings:

  • The shared step control of milestone 18 needed nothing new: a third basis beside the waves of a ring and the modes of a box.

  • Half of the time of the new benchmark goes into evaluating the potential again at every stage of every step, although it does not depend on time.

Left for later:

  • A coefficient that settles to a constant other than zero must be written as two terms.

  • Nonlinear terms, equations of second order in time and systems with free directions.

  • Coefficients that do not depend on time, sampled once.

With this milestone campaign D is complete.

M26. A follow-up to milestone 25

What milestone 25 left open (decisions D75 and D76).

What was built:

  • The parts of a stepped term that depend on neither the time nor the unknown are sampled once per solve, for every method that steps.

  • In free space the constant that a coefficient settles to is split off and propagated exactly. A coefficient no longer has to fall to zero.

Verified against a manufactured solution with a reaction and a drift that settle to constants, against the same equation with the constants written as terms of their own, and by a potential that is lifted by a constant, which turns the phase of the wave function and changes nothing else.

Findings:

  • The benchmark of milestone 25 takes 2.2 s where it took 3.8 s.

  • A flaw in the planner of milestone 22: on a line, a symmetric coefficient counted as settled on any interval around it. It was hidden as long as a source of the same extent set the box.

The boundaries campaign, continued

M27. Disks and rings with boundary conditions

The first part of A3 of the roadmap (decisions D75 and D77): a disk takes a condition on its rim in place of vacuum outside, and a ring one on each of its two rims. Stationary and in time.

What was built:

  • methods/polar.rs: Fourier waves along the angle, and for each wave collocation along the radius at the Gauss points of the grid, with the rims as further points of the polynomial. The matrix of every wave is diagonalised.

  • One type for the modes of a box and of a disk. The path of problems on boxes carries both.

  • pm.Disk(r, phi, radius, inner) with faces, and the boundary argument of a problem for them.

Verified against the zeros of the Bessel functions, against manufactured solutions with a mix of value and slope on the rim, with spectral convergence, against harmonic functions on a ring, and in time: heat in a disk decays at the rate of its lowest mode to 1e-8, and a driven drum follows its exact solution.

Findings:

  • Time, the planner and stepped terms needed no new code: they came with the interface that milestone 18 made for boxes.

  • The centre of a disk needs no condition when no grid point lies there. A prototype with Chebyshev points from the centre and a condition at it gave the same eigenvalues, to 1e-13 in both.

  • The eigenvectors along the radius are well conditioned: below 50 for 96 points and every wave.

  • A profile that adds up the times of phases overstates a phase that runs on several threads at once. The eigendecompositions of a disk are measured once, around all of them.

Left for later:

  • Balls, spherical shells and cylinders: the rest of A3.

  • The values on the rim as part of the solution.

  • Derivatives in stepped terms. Operators with a drift.

M28. Balls and spherical shells with boundary conditions

The second part of A3 of the roadmap (decision D78): a ball takes a condition on its surface in place of vacuum outside, and a shell one on each of its two surfaces. Stationary and in time.

What was built:

  • methods/round.rs, from methods/polar.rs: the functions of the angles are waves on a disk and spherical harmonics in a ball, and the rest is shared.

  • The spectral tail of a field in a ball, in harmonics.

  • pm.Ball(r, theta, phi, radius, inner) with faces.

Verified against the zeros of the spherical Bessel functions, against a manufactured solution with a mix of value and slope on the surface, with spectral convergence, against a harmonic function in a shell, and in time: the lowest mode of a ball, sin(πr)/r, decays as exp(−π²t) in the heat equation and swings as cos(πt) in the wave equation, both exactly.

Findings:

  • The first solve of a ball worked before a test for it was written: a test that expected a ball to be refused failed with a solution.

  • Two places counted the values of a field by the number of modes. That was right as long as every expansion was a change of basis.

Left for later:

  • Cylinders: the rest of A3.

  • Plots of solutions in a ball.

M29. Cylinders with boundary conditions

The third part of A3 of the roadmap (decision D79), which is done with it: a cylinder takes a condition on its wall and on each of its caps. It may be hollow, and it may be periodic along its axis.

What was built:

  • methods/cylindrical.rs: the modes of a disk and those of an axis of a box, put together.

  • pm.Cylinder(rho, phi, z, radius, z_range, inner, periodic) with faces, and its grid for problems with boundary conditions.

Verified against the eigenvalues of a can, which are sums of those of a disk and of a string, against a manufactured solution with the value on the wall, the slope on one cap and a mix on the other, with spectral convergence, against solutions in a hollow cylinder and in a pipe that repeats along its axis, and in time: heat in a can decays at the rate j² + π² of its lowest mode, and a driven can follows its exact solution.

Findings:

  • The kernel passed its tests on the first run. The parts it is made of had been tested in milestones 17 and 27.

  • A cylinder is the one round domain whose grid depends on what holds on its surface.

Left for later:

  • A4: shapes in the plane.

  • Plots of solutions in a cylinder.