Edge elements based numerical computation of dipole density