Numerical modelling of the dynamic behaviour of masonry structures