Numerical model for the cracking behavior of heterogeneous brittle solids subjected to thermal shock