Generator

vcycle-2d

One function in the grid2d library, called 7 times across 6 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 9 claims it put to the test while drawing them, and where it stands against the rule this site is named for.

At its defaults it draws v-cycle convergence factor against problem size, ε = 1. Three flat curves of convergence factor against the number of unknowns on a logarithmic axis. At small anisotropy one sits near one and the others near a tenth.

vcycle-2d is one function in lib/figures/grid2d.js — two dimensions — where the galerkin identity stops being an identity. Everything below came out of it during this build, at arguments taken from the essays rather than invented for this page. A figure here is the figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

Drawn even though every essay passes arguments — which on this site is every essay, at 100% of placements since the standard pass. A default nothing exercises is a trap for the next essay to call this with none, and this is the page where a default that has drifted from the figures around it becomes visible.

V-cycle convergence factor against problem size, ε = 1Three flat curves of convergence factor against the number of unknowns on a logarithmic axis. At small anisotropy one sits near one and the others near a tenth.10²10².⁵10³10³.⁵00.250.50.751unknownsresidual reduction per cyclepointy-linesemi-yy-line spread, 4× in size0.01point at the largest grid0.2y-line at the largest grid0.215×15, 31×31, 63×63 interior gridsflat in the size, whatever the anisotropy

Three flat curves of convergence factor against the number of unknowns on a logarithmic axis. At small anisotropy one sits near one and the others near a tenth.

eps: 0.001

The arguments are the ones A direction the smoother cannot see passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

V-cycle convergence factor against problem size, ε = 0.001Three flat curves of convergence factor against the number of unknowns on a logarithmic axis. At small anisotropy one sits near one and the others near a tenth.10²10².⁵10³10³.⁵00.250.50.751unknownsresidual reduction per cyclepointy-linesemi-yy-line spread, 4× in size1.1·10⁻⁴point at the largest grid0.97y-line at the largest grid0.03715×15, 31×31, 63×63 interior gridsflat in the size, whatever the anisotropy

Three flat curves of convergence factor against the number of unknowns on a logarithmic axis. At small anisotropy one sits near one and the others near a tenth.

eps: 1

The arguments are the ones The coarse problem is a different problem passes. A value drawn at the generator's defaults instead would be a picture no essay asked for and no assertion has been run against.

V-cycle convergence factor against problem size, ε = 1Three flat curves of convergence factor against the number of unknowns on a logarithmic axis. At small anisotropy one sits near one and the others near a tenth.10²10².⁵10³10³.⁵00.250.50.751unknownsresidual reduction per cyclepointy-linesemi-yy-line spread, 4× in size0.01point at the largest grid0.2y-line at the largest grid0.215×15, 31×31, 63×63 interior gridsflat in the size, whatever the anisotropy

Three flat curves of convergence factor against the number of unknowns on a logarithmic axis. At small anisotropy one sits near one and the others near a tenth.

What it checked while drawing

Every figure above asserted its own claims on the way to being drawn, and a claim that failed would have failed the build rather than drawn a wrong picture. Those assertions used to leave no trace at all: a passing one returned true and the only evidence the figure had checked anything was that nothing crashed. The list below is what they actually said, collected by running this generator with an observer installed — not a description of what it is believed to check.

9 distinct claims across 3 sets of arguments, grouped below by shape — because most of them are one sentence with a different number in it, and how many separate times that sentence was put to the test is the informative part.

every method returns a factor at k = 15 — asserted 3 times

line relaxation converges at k = 15 whatever the anisotropy — asserted 3 times

and at a real anisotropy the point smoother is far behind it

the grid size is one less than a power of two

the repaired factor does not move with the grid size

Against the rule

It draws a decomposition and prints its residual. It calls solve2d, and every figure above carries the badge — which residualcheck verifies by looking for it in the emitted SVG rather than by finding the call that builds one. A badge that is constructed and then left out of the body is the failure that check exists for.

Across the library: the rule bites on 52 of 99 generators — 37 print a residual and 15 are exempt with a published reason; 47 factorise nothing. Read from lib/residual-rule.js, which is the same body the gate enforces from, and the gate's last check fails the build if this page and it disagree about any generator.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

Iterating, instead of factorising

A direction the smoother cannot see

Give the Laplacian a strong direction and multigrid stops working — from 0.2016 a cycle to 0.9565 — with every component unchanged and the condition number identical to twelve digits. The problem did not get harder. The link between the method's two halves broke.

Iterating, instead of factorising

A rate that does not notice the size

The V-cycle reduces the residual by a factor of ten a cycle at fifteen points and at a hundred and twenty-seven. Jacobi on the same four problems goes from 0.981 to 0.9978, climbing towards one. One of those is a constant and the other is an exponent, and that is the whole distinction the field turns on.

Iterating, instead of factorising

Coarsening in one direction only

Leave the smoother alone and halve only the strong direction, and the smoothing factor is 0.3340 — identical to line relaxation's, at every anisotropy and every weight, to twelve digits. The convergence factors are then a factor of three apart, and at 45° both repairs fail outright.

Iterating, instead of factorising

Smoothing a whole line at once

Solve every grid line in the strong direction exactly rather than sweeping over it, and the smoothing factor goes from 0.9993 back to 0.3340 — which is the one-dimensional answer, on a problem that is not one-dimensional. The repair replaces one ε in the closed form by a one.

Iterating, instead of factorising

The coarse problem is a different problem

In one dimension the Galerkin coarse operator is the coarse discretisation, entry for entry — this site asserted it. In two dimensions a five-point operator produces a nine-point coarse one, so the recursion solves a different discretisation at every level below the first, and converges at 0.20 a cycle regardless.

Iterating, instead of factorising

The rate the condition number predicts

Conjugate gradients converge at a rate governed by the square root of the condition number. That is a bound rather than an estimate, it is provable, and it is loose enough that provisioning iterations from it wastes nine out of ten.

The whole library · All essays · What must fail