Regularization of the boundary integrals in the bem analysis of 3D potential problems