Thermal stress in a functionally graded curved bar