A compact locally one-dimensional method for fractional diffusion-wave equations