Simulation study of the mixed state in inhomogeneous superconductors