# M59. The modes of a box and of a round domain **Package:** F2, its third part: an eigenproblem on a box with walls, a disk, a ring, a ball, a shell or a cylinder. Their modes separate and are computed already, for problems in time: this is the way to ask for them, sorted by their eigenvalue. ## What was built - **`bounded_modes`**: an eigenproblem on a domain with boundary conditions. The equation is read as the one in time whose modes are asked for, by the reader of problems in time on boxes and round domains. The modes of that problem, which milestones 17 and 27 to 29 compute to propagate in them, are sorted by their eigenvalue, and the lowest are returned. - **`asked_modes`**: the step from an eigenproblem to that problem in time, which milestone 57 wrote for shapes, as a module of its own for shapes, boxes and round domains. - **Real modes.** Along an angle and along a periodic axis the modes are complex waves in pairs of one eigenvalue. Their real and imaginary parts are returned, made orthogonal within each eigenvalue, each with the integral of its square equal to one. - **The method `collocation_modes`** in a plan. The planner takes the coarsest grid on which the modes that are asked for are resolved, and `solve` without a plan returns what it found. - **The result** is that of every eigenproblem: `solution.eigenvalues`, the modes along the first axis. Values anywhere, integrals, pictures by state, files and exports work as for every solution there, with nothing new in the frontend. ## What it reaches | Domain | Modes | Grid | Error of the eigenvalues | Time | |---|---|---|---|---| | A string, held at both ends | 4 | 48 | $8\cdot10^{-13}$ | 0.01 s | | A plate of the sides 1 and 2, held | 6 | $24\times48$ | $4\cdot10^{-13}$ | 0.004 s | | The unit cube, held | 10 | $32^3$ | $10^{-12}$ | 0.04 s | | The unit cube, held | 100 | $48^3$ | | 1.6 s | | The unit disk, held | 6 | $24\times48$ | $3\cdot10^{-13}$ | 0.004 s | | The unit ball, held | 9 | $24\times24\times48$ | $6\cdot10^{-13}$ | 0.03 s | | A can of the radius 1 and the height 2, held | 4 | $24\times48\times48$ | $3\cdot10^{-13}$ | 0.03 s | The tests check a string with held, free and sprung ends, a plate with a pair of modes of one eigenvalue, a room with hard walls, a duct that is periodic along one axis, a disk with a held and with a free rim, a ring, a ball, a shell and a can, all against exact eigenvalues, and that the modes are orthonormal. The error of an eigenvalue of the string falls by more than a hundred from 8 points to 12 and again to 16. ## Decisions ### D59.1. The modes that exist, sorted *Developer, 2026-11-20.* On a box and on a round domain an operator with constant coefficients has modes that are products of modes of the single axes, and the code for problems in time computes all of them, in milliseconds. An eigenproblem there needs no method: it reads the equation as the one in time (decision D57.1), sorts the eigenvalues of the products, and returns the lowest with their functions. The iteration of milestones 55 and 58 is for operators whose modes do not separate. ### D59.2. Real functions, orthogonal within an eigenvalue *Developer, 2026-11-20.* The modes around an axis are $e^{\pm im\varphi}$, complex, in pairs of one eigenvalue. Of a real problem one expects real modes. The real and the imaginary part of each complex mode are modes, and those are returned: gathered eigenvalue by eigenvalue, each made orthogonal to the ones before it in its eigenvalue, and dropped where nothing is left of it. That gives the cosine and the sine of a pair, the $2l + 1$ real harmonics of a degree, and one function where the mode was real up to a phase. Which functions span an eigenvalue of several is a choice: this one depends on nothing but the grid. ### D59.3. Constant coefficients, and what a potential would need *Developer, 2026-11-20.* A potential between walls is what one asks for next, a particle in a box with a well. Its modes do not separate, and it is refused with that reason: it needs the block iteration, with the operator of collocation and its constant part as the preconditioner, and is a package of its own. A rectangle that is given as a region of the plane takes a potential today. ### D59.4. Any real mix on a face *Developer, 2026-11-20.* On a shape a condition that feeds the modes is refused, since the iteration needs a shift that is not known (decision D58.2). Here all eigenvalues are computed, and the lowest are the lowest whatever the sign of the mix: it is taken. A mix that is not real leaves eigenvalues that are not real, which have no order, and is refused when they are seen. ## What is left - A potential, a medium and a density between walls and on round domains. - Waveguides and cavities of Maxwell's equations, as pairs of scalar problems. - On shapes: many modes at once, and a boundary that feeds the modes.