The influence of diffusion on an epidemic model