Residual stresses in discontinuous metal matrix composites