Known limits

Everything that pdemagic refuses or does poorly today, in one place, with the package of the backlog that would lift it. The page for users is What is solved where. This one is complete, and written for the developer.

It was taken from the code after milestone 29: every place that raises UnsupportedProblemError, and every limit that a method page or a milestone names. A milestone that lifts a limit removes its line here, and one that finds a new limit adds it.

A problem that is refused raises UnsupportedProblemError with a message that names what was found. The limits further down, under “Limits that do not refuse”, are the ones a user meets without an error.

Domains

Limit

Package

A bounded domain in space that is not a box, a ball, a shell or a cylinder

A5

A boundary in the plane that is not made of lines and of arcs of circles and ellipses, or with an ellipse that is turned

A22

A box that is bounded along some directions and free along others

A6

Sectors of a disk and wedges as round domains: in the plane they are solved as regions of lines and arcs. Parts of a ball other than shells, a cylinder without ends

A16

Rings, shells and hollow or periodic cylinders with vacuum outside: they need a condition on each surface

A19

With vacuum outside a disk, a ball or a cylinder: any equation but Poisson’s, and any problem in time

A19, A20

The cylinder with vacuum outside uses another grid than the cylinder with conditions

A20

Periodic cells that are not rectangular

H9

More than three free directions together with screening, a wave number or periodic directions

H10

Data fields on different grids in one problem

K3

On a region of the plane an array is read between its points to the sixth order of its spacing, not spectrally, and its grid is uniform

K3

Stationary equations

Limit

Package

With free directions, only \(\sum a_i \partial_i^2 u + c\,u = f\) with real \(a_i\) of one sign: no first derivatives, no mixed derivatives, no orders above the second

H3

With free directions, coefficients that are not real

H3

The Helmholtz equation with a wave number that is complex far away

H11

Incoming waves cannot be stated: a scattering problem is written for the scattered wave

H11

A medium that traps waves: the iteration stalls near a resonance

D10

Coefficients that vary and do not settle to constants along free directions, or settle to an equation that is not Poisson’s, screened or Helmholtz

D7

Coefficients in front of the highest derivatives that vanish on average or towards free faces

D7

Nonlinear terms that hold a derivative of the unknown (\(u\,u_x\), \(\lvert\nabla u\rvert^2\))

D5

Nonlinear equations without a term that is linear in the unknown

D5

Nonlinear terms that are not differentiable: conjugate, re, im, arg, and the magnitude of a complex unknown

D5

A nonlinear equation that is a Helmholtz equation far away

D9

One solution of a nonlinear equation only, and no way to follow it as a parameter changes

D6

Complex sources with bodies and on disks, balls and cylinders with vacuum outside

J7, A19

A divergence other than \(\nabla\cdot(\varepsilon\nabla u)\), a gradient outside a divergence, an operator applied to a sum with terms that hold no unknown

G1

Equations in time

Limit

Package

In time on a region of the plane: a derivative of the unknown above the first order in a term that is stepped, and, in an equation of second order in time, a drift that the modes do not hold. A mix of value and slope on the boundary whose ratio is not real

A4

Derivatives of third and higher order in time, and mixed derivatives in time and space

H8

With free directions, terms that are stepped stand beside \(\sum (a_i \partial_i^2 u + b_i \partial_i u) + c\,u\) with real \(b_i\) only: not beside a third derivative (Korteweg–de Vries), a fourth, or a mixed one

H1

With free directions, a solution with dispersion travels far, and the box that shows it grows with the time span: an automatic grid has 512 points along a side at most, and beyond that the plan says that its grid does not resolve what is given

C19

With free directions, nonlinear terms

H1

With free directions, coefficients that vary in front of second derivatives, and in equations of second order in time

H2

With free directions, a coefficient whose value far away changes in time

H2

A derivative in time inside a term that is stepped, as a damping that varies in an equation of second order in time

H8

A solution that travels further than the padded transform can hold

H13

The grid is fixed for the whole solve

H13

Systems

Limit

Package

On boxes and round domains with boundary conditions: stationary systems, eigenproblems for several unknowns, and systems whose operator couples the unknowns

A11

Systems in time on boxes, round domains and regions: conditions that hold several unknowns, and a constraint whose operator has a mode that it maps to zero, as a Laplacian with no flux through any wall. Between walls an unknown has second derivatives along every direction with faces, or no derivative in space at all: one that diffuses along some directions alone is refused

A24

Systems on round domains with vacuum outside. And a derivative of an unknown in a term that couples, on a round domain

A11, A15

Stationary systems with free directions

H4

Systems in time with free directions that are not hyperbolic: diffusion, dispersion

H4

Systems with free directions that hold nonlinear terms, coefficients that vary, or constraints

H5

Stationary systems with nonlinear terms or coefficients that vary

H6

A constraint that is nonlinear in the unknown it fixes, or has a coefficient that varies there

H6

Equations that fall into groups with different methods or domains (decision D15)

H7

Per-wave matrices that exceed a fixed budget of memory

C10

Vector and tensor unknowns: a system is written component by component

G1, G2

Eigenproblems

Limit

Package

On boxes with walls and on round domains, an operator whose modes are no products has them found by an iteration on its stationary solve: slower by a factor of hundreds than sorting, with coefficients by formulas and not from an array, and on a round domain a potential only, no medium. A mix of the value and the slope that feeds the modes is refused there, and on a plate any mix within a condition

F2, A8

The iteration for modes that are no products has no shift near the eigenvalues that are asked for and no acceleration: forty steps for six modes, and more where modes lie close together at the end of its block

F2

A ball or a disk has a wall. A state that reaches it is squeezed, and its eigenvalue rises: hydrogen in a ball of the radius 40 has its first two levels to twelve digits and its third to six

F1

A pole of a potential inside a box or a ball is noticed only where a point of the grid meets it. Elsewhere the plan says that the modes are not resolved

F2

A plan of one’s own that asks for the highest modes of its grid gets modes of the grid, which only the diagnostic solution_tail shows

F2

On a region, a mode with a singularity at a corner is right to about six digits beside the corner, and its eigenvalue to nine: what the innermost of 18 layers leaves

F2

On a region the planner for modes solves with at most 60 000 points on the sides of elements, about a gigabyte: a shape with four or more corners that have a singularity is left unresolved, which the plan says

F2, C16

Many modes at once: the work between the solves grows with the square of their number. Forty modes of a disk take five seconds

F2

In free space only the bound states, and no potential with a singularity where it is lowest, such as \(-1/r\): that is solved in a ball or a disk

F1

In free space and on periodic domains only \(-\sum a_i \partial_i^2 + V(\mathbf{x})\) with positive constants \(a_i\) and a real potential: no medium, no weight that varies beside the eigenvalue. Nowhere first derivatives

F1

Only the lowest eigenvalues

F1

An operator that depends on its own eigenfunctions

F3

The states at a wave vector of a lattice other than zero

F4

Boundary conditions

Limit

Package

On a region of the plane: elliptic equations of second order for one unknown, linear or with a nonlinear term in the unknown. In a system each equation holds the second derivatives of one unknown, each condition one unknown, and in time the equations are of first order. A stationary system that is fixed up to a constant is refused. Nothing above the second order, and no coefficient that varies in front of a divergence whose inside varies too. In time the second derivatives are a divergence with a medium inside, \(\nabla\cdot(\varepsilon\nabla u)\): under a density if there is one: no different coefficients along the two coordinates, no mixed derivative, and no density beside a damping or beside a second derivative in time and a first. The density and the medium are positive, and they and a potential are real up to one common factor

A4

On a region: a condition that is not \(a\,u + b\,\partial_n u = g\) with constants \(a\) and \(b\)

A12

Parts of the boundary of a region that lie very close together: the planner finds no mesh, and a plan with a finer one is needed

A4

On a region, a ratio \(c/a\) that is an eigenvalue of one element alone, with zero on its rim: refused as if the shape resonated

A4

On boxes, stationary: elliptic equations of second order, with coefficients that may vary and with mixed derivatives, and the plate equation \(a\,\nabla^4 u + b\,\nabla^2 u + c\,u = f\) with constants. Nothing else above the second order. In time only \(\sum (a_i \partial_i^2 u + b_i \partial_i u) + c\,u\): no mixed derivative, and no plate that moves. An eigenproblem takes the mixed derivative and the plate, and no first derivatives

A7

The plate equation: no free edge in two or three dimensions, which needs conditions in its corners. No coefficient that varies, no nonlinear term, and no derivative along a face of a second or third derivative in a condition

A7

The plate equation in three dimensions: the values on the faces are found with a dense matrix, up to 3200 of them, which is 24 points along each axis of a cube

A7

The plate equation is refused where one of the two operators of second order that it is split in resonates, although the equation itself may have one solution

A7

On a box, a mixed derivative close to where the equation stops being elliptic: the iteration takes about a hundred steps at \(b^2 = 0.95 \cdot 4ac\), and beyond \(0.99 \cdot 4ac\) more than the two hundred that it has by itself

A7

On a box, a mixed derivative leaves singularities in the corners that open wider than a right angle once the equation is sheared to a Laplacian: solved, with a plan that says the solution is not resolved

A7

On boxes and round domains, a coefficient that varies in a stationary equation is a formula, not an array, and the equation must not leave its solution open up to a constant

A8

On a box, a coefficient of the second derivatives that vanishes on a face: solved, with a plan that says the solution is not resolved

A8

On boxes and round domains, a nonlinear term of a stationary equation is a function of the unknown and of the position, by a formula: no derivative of the unknown, no array in it or in the starting value. The linear part must fix the solution by itself: with slopes on every face it needs a term that holds the unknown

A9

On round domains: only \(a \nabla^2 u + c\,u = f\) with a constant \(a\), where \(c\) may vary in a stationary equation, and derivatives must be written as a Laplacian

A15

On round domains: stepped terms may not hold a derivative

A15

A condition that is not \(a\,u + b\,\partial_n u = g\) with constant \(a\) and \(b\): coefficients that vary over the face, derivatives along the face

A12

A condition with a derivative in time, such as a wall that lets waves out

A13

An equation without a second derivative along a bounded direction

A7

Drift that dominates diffusion: beyond a layer thinner than about a thirtieth of the box the modes of the axis cannot be used. The planner keeps the last grid on which they can, and its plan says that the solution is not resolved. A plan with a finer grid is refused

A17

Array data for one face is given on the whole grid

A18

The grid of a solution holds no values on the surface of a disk, a ball or a cylinder, nor on the boundary of a region. The solution gives them when it is called, solution(x, y): not in a ball, and not in a cylinder with vacuum outside

A18, K6

Bodies

Limit

Package

Bodies anywhere but in free space in three dimensions

J1, J2

Any equation but Poisson’s around bodies, and any problem in time

J4

Bodies together with coefficients that vary or nonlinear terms

J6

Bodies that touch or contain each other, and charge that reaches a surface

J3, J6

More than 12 000 triangles: the matrix is dense

C5

Flat triangles: second order

J5

Input and output

Limit

Package

Symbols that are not coordinates: numbers must be substituted first

K4

sympy expressions without a counterpart in the core: Piecewise, Heaviside, Min, Max, Bessel functions and others

K5

The error function of a complex number

K5

Derivatives of data fields

K3

Solving on another grid than the one array data is given on

K3

Complex arrays in one piece: they are given as two real arrays

K2

Plots of solutions in more than three dimensions, and of bodies with their charge. In a ball and in a cylinder a plot is a section along one of the coordinates of the domain: no other plane, and no view in space

K1

A section of a ball through its axis is drawn with the angles of the grid: its outline has as many corners as the grid has angles from the axis

K1

Values of a solution between grid points, where a direction is free, in a ball, and in a cylinder with vacuum outside. The gradient of a solution and the flux through a face, on every domain. Integrals of anything but an unknown itself: of its square, of its energy. Values at times between those that are recorded

K6

Where a direction is free, the integral of a solution is the integral over the box of its grid, by the trapezoidal rule: not over all of space

K6

A value between grid points sums over the whole grid: a thousand points on a grid of 64³ take a tenth of a second, and the time grows with both numbers

K6

On a region, a point within a thousandth of the side of an element beside the boundary counts as on it, and gets a value: the sides of the elements are that far off a curved boundary themselves, at a degree of 4. At a degree of 2 or 3 a point on a curved boundary may still fall outside, and get none

K6

A solution that is loaded from a file knows its domain and what the solver read of its problem, not the equations as sympy wrote them: it is read, called and plotted, and cannot be solved again. The values of data fields are not in the file

K7

A VTK file of a solution on a region of the plane holds the grid over the rectangle around the region, with no number outside it: not the elements. A VTK file of a problem with bodies does not hold their surfaces

K7

Languages other than Python, and use without programming

E1 to E5

The number of threads cannot be set from the plan

C11

Limits that do not refuse

These do not raise an error. A user meets them as lost digits, a long wait or a surprise.

Accuracy

Limit

Package

Second order only: cylinders with vacuum outside, and bodies

A20, J5

In time on a region, a corner of the boundary at which the solution has a singularity costs the fast convergence: three or four digits. The mesh has no layers there, since the modes hold too few points for them

C17

On a region, the layers of the mesh follow from the angle of a corner alone. A medium or coefficients that differ by direction change the exponent of its singularity, and a jump in the values given along the boundary is a singularity that is not looked for

A4

In time on a region, rounding in the eigenproblem bounds the accuracy at about \(10^{-10}\): the largest eigenvalue grows with the fourth power of the degree. And a wave whose start does not fit the condition on the boundary carries a kink for good

C17

Sources and initial states that are not smooth lose the spectral accuracy. Shocks are out of reach for these methods

H12

Stepped terms at Chebyshev points are not dealiased

A21

Boundary values that disagree in a corner are solved, and reported only afterwards as not resolved

L3

The resolution is judged on what is given, not on the solution: a solution with finer structure than its data passes unnoticed. Not so for stationary equations on a region, where the planner solves and looks at the solution

D8

For nonlinear stationary equations in free space, the box holds what is given, not the solution

D8

Size and speed

Limit

Package

Sources, nonlinear terms and the small matrices of systems are interpreted: 40 to 50 % of a stepped solve

C4

Complex transforms where real ones would do, in propagation and stepping

C6

Complex matrices for the modes of real problems on boxes

C7

Every solve builds its kernel anew, and every step of an iteration its arrays

C8, C9

On a region, a solve takes about 8 kilobytes for each point on the sides of elements where its matrix is real and of one sign, 23 where it is real, and 33 where it is complex: 0.3, 0.4 and 0.7 gigabytes for 25 000. A plan is refused above 80 000, and above 160 000 for a real problem. The sparse factorization runs on one core

C16

A real symmetric matrix of both signs, as of the Helmholtz equation on a region, is factorized as a general real one: the library’s sparse factorization for symmetric matrices takes those of one sign only

C16

A system on a region is factorized as a general matrix, and its points inside elements are eliminated in complex numbers, whatever it is

C16

In time on a region, a drift whose coefficients vary is stepped, and so is every other term with a derivative, and a drift with constant coefficients that is stronger than 24 against the diffusion across the region. The steps shrink with the square of the degree and with the strength of the term: heat with a drift of 20 on a triangle takes 20 500 steps and 138 seconds at the planner’s choice. A weaker drift with constant coefficients is exact, at a degree that grows with it: 16 for a drift of 12 on that triangle, which takes 22 seconds

A4

In time on a region, the modes come from one dense eigenproblem, on one core: time with the cube of the number of points, memory with its square. The planner stays below 3 500 points (a few seconds), and a plan is refused above 6 000 (over half a minute, 1.2 gigabytes). A pulse narrower than about a tenth of the region is not resolved within that, and waves reach three or four digits. Stepping costs two products with the matrix of the modes for every evaluation of its terms: the planner stays below 1 700 points there, which take about eight seconds

C17

The small matrices of systems are computed on one thread

C10

On round domains: the transforms of cylinders are plain loops, the tables of harmonics are computed again and again, and a stationary solve on a disk computes all modes

C12

The transform to spherical harmonics costs \(N^4\), the surface integral of the cylinder with vacuum outside \(N^5\)

C13, A20

The planner chooses about twice the points per direction that the accuracy needs

C14

With free directions, the bound on the travel of a solution with an operator above the second order takes about as long as the propagation in three dimensions: it evaluates the symbol for every wave of what is given, once for each of a dozen decays and each face

C19

One machine, shared memory, no GPU

ideas

Five of the targets for speed are not reached: see benchmarks

C4, C6, C8

Behaviour that may surprise

Limit

Package

A disk, a ball or a cylinder without boundary conditions is solved with vacuum outside, and only the plan says so

L1

No box is found for a source that does not decay. One that decays slowly, as \(1/(1 + r^2)\), gets a box so large that no automatic grid resolves the source, with a plan that says so

H12

What cannot be installed

pdemagic comes as packages for Linux on x86-64 and ARM, for macOS on Apple silicon and Intel, and for Windows on x86-64, for Python 3.11 and later (milestone 41). Elsewhere it cannot be installed: there is no package of the source to build from, because the project is closed (decisions D39.1 and D41.1). That leaves out Linux with musl, such as Alpine, Windows on ARM, and Python 3.10 and older.

The package for Linux on ARM is built on another machine and is not tested before it is published (B6). Those for the other four platforms are. Packages for musl and for Windows on ARM are B7.