Generalization of the theory of volume filling of micropores to nonhomogeneous microporous structures