Dissipative second-order forward advection stencil (source code)

= Dissipative second-order forward advection stencil
{title2=$D_{+,2}=(-3I+4S-S^2)/(2h)$}

For the equation $u_t=u_x$, the second-order forward difference has <Fourier symbol> $[-(1-\cos\theta)^2+i\sin\theta(2-\cos\theta)]/h$. The nonpositive real part gives a contractive semidiscrete evolution in the discrete <L2 norm>. Equivalently, for the unitary lattice shift $S$, $\operatorname{Re}\langle u,D_{+,2}u\rangle=-\|(S-I)^2u\|^2/(4h)$. A centred difference in another direction contributes only a skew-adjoint term, preserving this energy estimate.