Design Criteria for the Use of Special Devices in the Seismic Protection of Masonry Structures