Simulation of Nanometer-Scale Deformation of Metallic and Ceramic Surfaces