Solution (source code)

= Solution

Apply the <Rankine-Hugoniot conditions> to the conserved variables $(h,hu)$ and flux $(hu,hu^2+h^2/2)$. They give
$$
s(h_1-1)=h_1u_1,\qquad sh_1u_1=h_1u_1^2+\frac{h_1^2-1}{2}.
$$
For a genuine shock, $h_1\ne1$. Eliminating $u_1$ yields $s^2=h_1(h_1+1)/2$. Taking the positive branch requested,
$$
\boxed{s=\sqrt{\frac{h_1(h_1+1)}2},\qquad u_1=(h_1-1)\sqrt{\frac{h_1+1}{2h_1}}}.
$$
When $h_1=1$, the jump conditions instead force $u_1=0$ and describe a constant state; the labelled interface can then move at any speed and is not a shock. The nontrivial formulas describe a <shallow-water shock into stationary unit-depth water>.