Using the adjoint equation method to optimize FGM thermoelastic structures