An analytical model for the mechanical deformation of locally graphitized diamond