If we define a polarization vector P, which is the volume density of electric dipole moment, that can be written as:
dp = Pdv'
The polarization can be calculated from the contributions of surface and volume charge distributions, thus:
Surface polarization charge density:
ρ = P · an
Volume polarization charge density:
ρ = -∇ · P