New design and retrofit of existing masonry buildings based on nonlinear static analysis.