Finite element modelling of two- and three-dimensionalviscoelastic polymer flows