Damage investigation on tungsten and diamond diffractive optics at a hard x-ray free-electron laser.