\left[\frac 12 \int_\Omega \left(\frac{\partial u}{\partial
t}\right)^2 + (\nabla u)^2 \; dx\right]
=
- \int_\Omega f \; dx
+ \int_\Omega f \frac{\partial u}{\partial t} \; dx
+
\int_{\partial\Omega} n\cdot\nabla u
\frac{\partial g}{\partial t} \; dx.
that the time step must not be larger than the time it takes a wave to
cross a single cell.
-In the program, we will refine a square
-$[-1,1]$ seven times uniformly, giving a mesh size of $h=\frac 1{64}$, which
+In the program, we will refine the square
+$[-1,1]^2$ seven times uniformly, giving a mesh size of $h=\frac 1{64}$, which
is what we set the time step to. The fact that we set the time step and mesh
size individually in two different places is error prone: it is too easy to
refine the mesh once more but forget to also adjust the time step. @ref