Determination of the stress profile in ion implanted garnets