Inflow advection energy estimate from summation by parts (source code)

= Inflow advection energy estimate from summation by parts
{title2=$HD+D^TH=e_Ne_N^T-e_0e_0^T$}

For $U_t=-cDU$ with $c>0$, a positive discrete norm matrix $H$ satisfying the displayed identity gives $d(U^THU)/dt=-c(U_N^2-U_0^2)$. Homogeneous inflow data $U_0=0$ therefore leave only the nonpositive outflow flux. Inhomogeneous inflow contributes a controlled boundary forcing term. This estimate includes the numerical boundary closure, unlike an interior-only <Fourier stability analysis>. For any dissipative semidiscrete operator in the $H$ norm, <Backward Euler method> steps preserve the contraction by the identity $\|U^{n+1}\|_H^2-\|U^n\|_H^2=2k\langle U^{n+1},AU^{n+1}\rangle_H-\|U^{n+1}-U^n\|_H^2$.