The yield stress gradient effect in inhomogeneous materials