Gradient piezoelectricity for cracks under an impact load