Abstract
A method for solving Poisson's equation as a set of finite-difference equations is described for an arbitrary localized charge distribution expanded in a partial-wave representation. The procedure is an extension of the widely used technique developed by Loucks for spherically symmetric charge densities. In the present development, the higher partial-wave components of the density lead to an l dependence in the boundary conditions and the finite-difference equations. The potential components for l>0 can be calculated recursively with the same degree of accuracy and efficiency as for the l=0 case. This procedure requires the additional computational step of evaluating a one-dimensional integral of each density component to determine the multipole moment, required by the boundary condition at large r. Specific modifications required to adapt the Loucks technique for this more general charge density are described, and illustrative results are given for a model density with components ρl(r)=Clrlealr, which can also be treated analytically.