  We propose a topological characterization of Hamiltonians describing
classical waves. Applying it to the magnetostatic surface spin waves that are
important in spintronics applications, we settle the speculation over their
topological origin. For a class of classical systems that includes spin waves
driven by dipole-dipole interactions, we show that the topology is
characterized by vortex lines in the Brillouin zone in such a way that the
symplectic structure of Hamiltonian mechanics plays an essential role. We
define winding numbers around these vortex lines and identify them to be the
bulk topological invariants for a class of semimetals. Exploiting the bulk-edge
correspondence appropriately reformulated for these classical waves, we predict
that surface modes appear but not in a gap of the bulk frequency spectrum. This
feature, consistent with the magnetostatic surface spin waves, indicates a
broader realm of topological phases of matter beyond spectrally gapped ones.
