upwind_1st
Stencil

i−1 to i);
the negative-velocity branch is the mirror image (offsets 0 and +1
with sign-flipped coefficients).Coefficients
| selector kind | axis | offset | coeff |
|---|---|---|---|
cartesian | $x | −1 | −1 / dx |
cartesian | $x | 0 | +1 / dx |
Combined as +. Adds an explicit (dx/2) · u′′(x) numerical-diffusion term;
this stabilizes advection-dominated problems but is the source of well-known
upwind smearing.
Convergence

u(x) = sin(2πx) with N up to 512.
The slope cleanly matches the expected −1 reference.Fixture: discretizations/finite_difference/upwind_1st/fixtures/convergence/