A numerical approach for current source detection