Generator

angle-cliff

One function in the supg2d library, called 9 times across 8 essays. Below: what it draws at its defaults, what it draws at every value an essay asks for, the 8 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 error against the angle between the flow and the grid, at pe = 3.13. Three curves against the flow angle on a logarithmic vertical axis. The tuned scheme is exact at zero — 2.4·10⁻¹⁷ — and is 0.00794 five degrees later. Central differencing and upwinding start at 0.517 and 0.136 and fall as the angle grows, because the exact solution's own size in the interior falls with it.

angle-cliff is one function in lib/figures/supg2d.js — the tuned diffusion in two dimensions — exact along one axis, and the direction it does not go. 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.

Error against the angle between the flow and the grid, at Pe = 3.13Three curves against the flow angle on a logarithmic vertical axis. The tuned scheme is exact at zero — 2.4·10⁻¹⁷ — and is 0.00794 five degrees later. Central differencing and upwinding start at 0.517 and 0.136 and fall as the angle grows, because the exact solution's own size in the interior falls with it.05101520253035404510⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²angle between the flow and the grid (degrees)worst nodal errortunedcentralupwindexact, and then nottuned, on the axis2.4·10⁻¹⁷tuned, five degrees off0.0079tuned at 45°0.066upwind at 45°0.0019fifteen orders of magnitude for five degreesand the worst of the three by forty-five

Three curves against the flow angle on a logarithmic vertical axis. The tuned scheme is exact at zero — 2.4·10⁻¹⁷ — and is 0.00794 five degrees later. Central differencing and upwinding start at 0.517 and 0.136 and fall as the angle grows, because the exact solution's own size in the interior falls with it.

eps: 0.015

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.

Error against the angle between the flow and the grid, at Pe = 2.08Three curves against the flow angle on a logarithmic vertical axis. The tuned scheme is exact at zero — 2.6·10⁻¹⁷ — and is 0.00474 five degrees later. Central differencing and upwinding start at 0.367 and 0.178 and fall as the angle grows, because the exact solution's own size in the interior falls with it.05101520253035404510⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²angle between the flow and the grid (degrees)worst nodal errortunedcentralupwindexact, and then nottuned, on the axis2.6·10⁻¹⁷tuned, five degrees off0.0047tuned at 45°0.049upwind at 45°0.0093fifteen orders of magnitude for five degreesand the worst of the three by forty-five

Three curves against the flow angle on a logarithmic vertical axis. The tuned scheme is exact at zero — 2.6·10⁻¹⁷ — and is 0.00474 five degrees later. Central differencing and upwinding start at 0.367 and 0.178 and fall as the angle grows, because the exact solution's own size in the interior falls with it.

eps: 0.01

The arguments are the ones Aggregating what the matrix calls strong 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.

Error against the angle between the flow and the grid, at Pe = 3.13Three curves against the flow angle on a logarithmic vertical axis. The tuned scheme is exact at zero — 2.4·10⁻¹⁷ — and is 0.00794 five degrees later. Central differencing and upwinding start at 0.517 and 0.136 and fall as the angle grows, because the exact solution's own size in the interior falls with it.05101520253035404510⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²angle between the flow and the grid (degrees)worst nodal errortunedcentralupwindexact, and then nottuned, on the axis2.4·10⁻¹⁷tuned, five degrees off0.0079tuned at 45°0.066upwind at 45°0.0019fifteen orders of magnitude for five degreesand the worst of the three by forty-five

Three curves against the flow angle on a logarithmic vertical axis. The tuned scheme is exact at zero — 2.4·10⁻¹⁷ — and is 0.00794 five degrees later. Central differencing and upwinding start at 0.517 and 0.136 and fall as the angle grows, because the exact solution's own size in the interior falls with it.

eps: 0.02

The arguments are the ones Coarsening in one direction only 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.

Error against the angle between the flow and the grid, at Pe = 1.56Three curves against the flow angle on a logarithmic vertical axis. The tuned scheme is exact at zero — 3.5·10⁻¹⁷ — and is 0.00303 five degrees later. Central differencing and upwinding start at 0.263 and 0.198 and fall as the angle grows, because the exact solution's own size in the interior falls with it.05101520253035404510⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²angle between the flow and the grid (degrees)worst nodal errortunedcentralupwindexact, and then nottuned, on the axis3.5·10⁻¹⁷tuned, five degrees off0.003tuned at 45°0.037upwind at 45°0.019fifteen orders of magnitude for five degreesand the worst of the three by forty-five

Three curves against the flow angle on a logarithmic vertical axis. The tuned scheme is exact at zero — 3.5·10⁻¹⁷ — and is 0.00303 five degrees later. Central differencing and upwinding start at 0.263 and 0.198 and fall as the angle grows, because the exact solution's own size in the interior falls with it.

eps: 0.05

The arguments are the ones Smoothing a whole line at once 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.

Error against the angle between the flow and the grid, at Pe = 0.63Three curves against the flow angle on a logarithmic vertical axis. The tuned scheme is exact at zero — 1.7·10⁻¹⁶ — and is 5.86·10⁻⁴ five degrees later. Central differencing and upwinding start at 0.0556 and 0.157 and fall as the angle grows, because the exact solution's own size in the interior falls with it.05101520253035404510⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²angle between the flow and the grid (degrees)worst nodal errortunedcentralupwindexact, and then nottuned, on the axis1.7·10⁻¹⁶tuned, five degrees off5.9·10⁻⁴tuned at 45°0.0094upwind at 45°0.034fifteen orders of magnitude for five degreesand the worst of the three by forty-five

Three curves against the flow angle on a logarithmic vertical axis. The tuned scheme is exact at zero — 1.7·10⁻¹⁶ — and is 5.86·10⁻⁴ five degrees later. Central differencing and upwinding start at 0.0556 and 0.157 and fall as the angle grows, because the exact solution's own size in the interior falls with it.

eps: 0.03

The arguments are the ones The error smoothing cannot reach 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.

Error against the angle between the flow and the grid, at Pe = 1.04Three curves against the flow angle on a logarithmic vertical axis. The tuned scheme is exact at zero — 3.1·10⁻¹⁶ — and is 0.00156 five degrees later. Central differencing and upwinding start at 0.145 and 0.2 and fall as the angle grows, because the exact solution's own size in the interior falls with it.05101520253035404510⁻¹⁷10⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²angle between the flow and the grid (degrees)worst nodal errortunedcentralupwindexact, and then nottuned, on the axis3.1·10⁻¹⁶tuned, five degrees off0.0016tuned at 45°0.022upwind at 45°0.032fifteen orders of magnitude for five degreesand the worst of the three by forty-five

Three curves against the flow angle on a logarithmic vertical axis. The tuned scheme is exact at zero — 3.1·10⁻¹⁶ — and is 0.00156 five degrees later. Central differencing and upwinding start at 0.145 and 0.2 and fall as the angle grows, because the exact solution's own size in the interior falls with it.

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.

8 distinct claims across 6 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.

a diffusion small enough for a layer and large enough to draw

a grid the dense solve is affordable at

a sweep that starts on the axis and leaves it

and at this Péclet number is still the best of the three at the largest angle

and is the worst of the three at the largest angle drawn

and not five degrees off it

LU is for square matrices

the tuned scheme is exact on the axis

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 70 of 151 generators — 55 print a residual and 15 are exempt with a published reason; 81 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

Aggregating what the matrix calls strong

The depth phase measured every method it had on the 45°-rotated anisotropic operator — 0.784, 0.883, 0.844 — and diagnosed the failure as being in the discretisation rather than in the hierarchy. Smoothed aggregation is the standard answer to anisotropy. It returns 0.789.

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

Exact along one axis

The tuned diffusion makes the answer exact at every node, and in two dimensions it holds at exactly one flow angle. Five degrees off the grid the relative error goes from 1.2·10⁻¹⁴ to 6.9, and by twenty degrees the scheme is worse than the upwinding it was built to improve on.

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 diffusion that makes the answer exact

Upwinding adds h/2 of artificial diffusion. Central differencing adds none. Add ε·ξ·Pe with ξ = coth(Pe) − 1/Pe and the computed solution is the exact one at every grid point, to 2.4·10⁻¹⁷ — at every Péclet number, on the problem it was derived from and on no other.

Iterating, instead of factorising

The direction the diffusion does not go

Streamline diffusion adds τbbᵀ, a rank-one tensor that annihilates every direction across the flow. That is the design. The price is 18, 50 and 48 nodes where the computed solution leaves the interval the equation guarantees — and half a coefficient of crosswind diffusion halves the error at every angle while costing exactly nothing where the scheme was exact.

Iterating, instead of factorising

The error smoothing cannot reach

One weighted Jacobi sweep multiplies every mode of the error by a number, and the number is a sine. Half the modes are cut by three or better, and the other half come back at 0.999 — which is not a failure of the method but the fact the whole of multigrid is built on.

The whole library · All essays · What must fail