Thermodynamics of Deformation in Structured Media