The computation of discontinuous solutions of linear hyperbolic equations