Alternating method applied to edge and surface crack problems