Viscoelastic flow past confined objects using a micro–macro approach