Numerical Methods for Simulations of Planetary Impacts