Ewald: direct_sum() for dipole moment