Detection and localization of structural damage based on the error in the constitutive relations in dynamics