Deformation characterization of a nanoelectromechanical switch