An efficient method for simulating the dynamic behavior of periodic structures with piecewise linearity