The Shockley-like equations for the carrier densities and the current flows in materials with a nonuniform composition