Numerical simulation of magnetohydrodynamic shock propagation in the corona