Damage models for the seismic response of brick masonry shear walls. Part I: the mortar joint model and its applications