current dipole computation