Three-dimensional, time-dependent, MHD model of a solar flare-generated interplanetary shock wave