A Numerical Method for Vortex Confinement in Compressible Flow