The hardness is the property of a material due to which it