Measurement and prediction of residual stress generated by local compression