Transport barriers — the Lagrangian side of sampleGrad

The Q-criterion asks what the flow is doing at a point, right now. This asks something particles care about more: over the next T seconds, which pairs of neighbours get pulled apart? That is the FTLE — integrate the deformation gradient along a trajectory, take its largest singular value, and the bright ridges are the surfaces material cannot cross. Every gradient in that integration comes from field.sampleGrad(), analytically; there is no finite-difference step anywhere in this page.

FTLE · z-slice

Is the gradient right? A known answer, not a self-comparison

The ABC field u = (A sin z + C cos y, B sin x + A cos z, C sin y + B cos x) has a Jacobian you can write down by hand. Comparing all nine entries against sampleGrad over 200 points:
max |difference| = —.
This is the receipt that matters. Checking the gradient against a finite difference of the same sampler would only prove the sampler is self-consistent.

Incompressibility, from the gradient alone

The trace of ∇u is the divergence, so it must vanish identically: max |tr ∇u| = — over the same points.

What the picture is

—
—