Ultrasonic testing is done in materials to determine