Modelling of masonry structures