Non-isothermal flow of a molten polymer in a narrow rectangular cavity