Analysis of the localization of damage and the complete stress-strain relation for mesoscopic heterogeneous rock under uniaxial tensile loading