Numerical methods for the study of deformable bodies in viscous and viscoelastic flows