Mechanics And Thermodynamics Of Polythermal Glaciers