Finite-element method for the determination of the surface stress field from the real microstructure of anisotropic materials