Effect of flexoelectricity on the nano-mechanical properties of ferroelectrics