Mechanics of polymer processing