A NUMERICAL METHOD FOR THE STABILITY PROBLEM OF MASONRY ELEMENT