Thermoelastic instability of a functionally graded layer interacting with a homogeneous layer