Magnetohydrodynamic simulation of the inverse-pinch plasma discharge