Influence of the Compositional Profile of Functionally Graded Material on the Crack Path under Thermal Shock