Discrete modelling of masonry structures under dynamic loading