M57. The modes of a shape

Package: F2, its first part: the lowest eigenvalues and eigenfunctions of an operator on a region of the plane, with a condition on each piece of its boundary. The modes of a drum of any shape.

What was built

  • shaped_modes: an eigenproblem on a shape. The equation \(H u = E\,\rho\,u\) is turned into the one in time whose modes are asked for, \(\rho\,u_t = -H u\), and read by the code that reads a problem in time on a shape. The modes of that problem, which milestone 34 computes to propagate in them, are sorted by their eigenvalue, and the lowest are returned.

  • What an eigenproblem may have is what the modes hold: a medium, a potential, a density beside the eigenvalue, also from arrays, and on each piece of the boundary the value, the slope or a mix of both equal to zero.

  • The method element_modes in a plan, with the degree and the spacing of the elements. The planner computes the modes on one degree after another, and solve without a plan returns what it found.

  • The result is that of milestone 55: solution.eigenvalues, the modes along the first axis, each with the integral of its square equal to one. Values anywhere, integrals, pictures by state, files and exports work as for every solution on a region.

What it reaches

Shape

Modes

Degree

Points

Error of the eigenvalues

Time

The unit square, fixed

4

12

913

\(4\cdot10^{-12}\)

0.3 s

The unit disk, fixed

6

10

2 481

\(4\cdot10^{-10}\)

3.1 s

The unit disk, free

4

8

1 601

\(10^{-9}\)

1.2 s

The L-shape, fixed

1

8

\(6\cdot10^{-3}\)

0.1 s

The disk has the squares of the zeros of the Bessel functions, and of their derivatives where its rim is free. The square has \(\pi^2(m^2 + n^2)\), and with a medium 2, a potential 3 and a density 4 it has \((2\pi^2(m^2 + n^2) + 3)/4\). A density from an array gives the eigenvalues of the same density from a formula to \(10^{-9}\).

Decisions

D57.1. An eigenproblem is the problem in time whose modes are asked for

Developer, 2026-11-20.

The modes of a shape exist since milestone 34, for the operator that the reader of problems in time finds in an equation: with a medium, a potential, a density, by formulas or arrays. An eigenproblem is turned into such an equation, with the derivative in time where the eigenvalue stands, and read by that reader. Nothing about the operator is read twice, and whatever the modes learn to hold later, an eigenproblem may have at once.

D57.2. Conditions that give zero

Developer, 2026-11-20.

A mode has the value, the slope or a mix of both equal to zero on each piece of the boundary. A condition that gives something else has no modes: it is refused, and not silently taken as zero.

D57.3. The integral of the square is one, also under a density

Developer, 2026-11-20.

Under a density the modes are orthogonal with the density as a weight, and one could normalize them so. A constant density, however, is a factor of the eigenvalue and no weight, and the two cases would differ. Every mode has the integral of its square equal to one, as in free space: one rule, and the weighted norm is one line for whoever needs it.

D57.4. Six digits of the modes, a dozen of the eigenvalues

Developer, 2026-11-20.

The planner asks that the Legendre coefficients of the modes fall to \(10^{-6}\), not to the \(10^{-8}\) of a problem in time. The eigenvalues are then right to \(10^{-10}\) and better, since their error is the square of that of the modes. Two more digits of the modes would take the next degree, and with a dense eigenproblem that is three times the time.

D57.5. The dense eigenproblem, for now

Developer, 2026-11-20.

All modes of the elements are computed and the lowest returned. That is simple and exact, and wasteful: a few thousand points exhaust it, a shape with a hole is left unresolved, and the mesh cannot shrink towards corners. The lowest modes follow from the stationary solve by inverse iteration, which is sparse. That is the next part of F2, and it replaces this path for eigenproblems.

What is left

  • The lowest modes by iteration on the stationary solve: more points, corners, holes.

  • Boxes and round domains.

  • Waveguides and cavities, as pairs of scalar problems.

  • First derivatives.