  We describe a rapidly converging algorithm for solving the Kohn--Sham
equations and equations of similar structure that appear frequently in
calculations of the structure of inhomogeneous electronic many--body systems.
The algorithm has its roots the Hohenberg-Kohn theorem and solves directly for
the electron density; single--particle wave functions are only used as
auxiliary quantities. The method has been implemented for symmetric ``slabs''
of jellium as well as for spherical jellium clusters. Starting from very rough
guesses for the initial electron density, convergence is reached within a few
iterations. The iterations are driven by the static electric susceptibility.
