Influences of the inhomogeneity of the ferroelectric thin films on switching current