Modelling cracks in finite bodies by distributed dislocation dipoles