Analysis of masonry structures by discrete finite element method