Sign outOpen workspaceSign in

SlotLayer 0

Replace a spatial domain with a finite grid

Approximate the spatial derivatives of a PDE on finitely many points, leaving time continuous, so that what remains is a system of ordinary differential equations in the grid values. The method of lines: the continuum is gone, the clock is not.

Takes

A linear PDE with its initial and boundary conditions, a domain, a lattice spacing or basis size, and a smoothness assumption on the exact solution — the truncation bound is derived by Taylor expansion and is only valid to the order the solution is differentiable.

Returns

A generator A acting on the vector of grid values, an initial vector, and the truncation error the replacement cost — stated as a power of the lattice spacing, which is the term that fixes how fine the grid has to be.

This one, drawn

Drag to pan. Pinch, or hold ctrl and scroll, to zoom. Arrow keys pan, plus and minus zoom, zero resets the view.

From Partial differential equation to Linear ODE system

A circle is an object you are holding. Each line between the two ends is one recorded way through this slot; where a way is built from smaller slots, those are its own lines. Circles are named on hover, and each one is a link.

Nothing drawn here has a recorded way through it that this figure leaves shut. See it on the map

Why this is a layer

The choice made here is not which grid but which approximation of the derivative — concretely, the three-point second-order stencil against a higher-order one, which is the difference between the two methods drawn below. The competing answers trade against each other rather than dominating. A low-order stencil touches few neighbours, so the generator stays sparse and every downstream simulation cost — which is charged in sparsity — stays low, and the truncation error falls only as the square of the spacing. A high-order stencil buys error falling as a much higher power of the spacing and pays for it in a denser generator, which Costa, Jordan and Ostrander state outright as the trade: better error scaling comes 'at the cost of simulating more complex (less sparse) Hamiltonians'. Which side of that trade wins depends on the smoothness of the solution, because a high-order discretization is only justified if the exact solution has the derivatives its Taylor expansion assumes. So a reader standing here is choosing between sparsity and grid size under a regularity assumption they have to make explicit, and no theorem settles it for them.

Ways to do this

2 methods recorded

  • Graph-Laplacian finite differences

    Discretize the domain onto a lattice and read the discrete Laplacian off the resulting graph: off-diagonal entries minus one between neighbours, each diagonal entry the degree of its vertex. Higher-order stencils are obtained by factorizing the operator through hypergraph incidence matrices, which is what lets the error fall faster than the second power of the spacing while keeping a form a simulator can consume.

  • Central differences, space only

    Replace each second spatial derivative by the three-point central difference on a uniform grid and leave the time derivative alone. What comes out is the plainest form the method of lines takes: one generator, assembled from a single stencil repeated at every interior point, acting on the vector of grid values.

Routes that skip this layer

No recorded route avoids this step.

This is a step inside

Nothing in this graph needs this as a step, so it is where a reading starts.

In the Atlas

No record in the Atlas covers this yet. The catalogue is circuits and primitives; this part of the literature is not in it.