The effects of population structure on the spread of the HIV infection