The transfer of energy between electrons and ions in solids