Calculation of strain distributions at the edge of strained-layer structures