3D meso- and macro-scale models for nonlinear analysis of masonry systems