Damage diagnosis and life-time assessment of concrete and masonry structures by an acoustic emission technique