Geometric analysis and nonlinear wave propagation in dispersive and inhomogeneous media with Hamiltonian flows | Synapse