Numerical simulation of viscoelastic particulate flows using the immersed boundary method