  A density-functional theory is developed based on the Maxwell--Schr\"odinger
equation with an internal magnetic field in addition to the external
electromagnetic potentials. The basic variables of this theory are the electron
density and the total magnetic field, which can equivalently be represented as
a physical current density. Hence, the theory can be regarded as a physical
current-density functional theory and an alternative to the paramagnetic
current density-functional theory due to Vignale and Rasolt. The energy
functional has strong enough convexity properties to allow a formulation that
generalizes Lieb's convex analysis-formulation of standard density-functional
theory. Several variational principles as well as a Hohenberg--Kohn-like
mapping between potentials and ground-state densities follow from the
underlying convex structure. Moreover, the energy functional can be regarded as
the result of a standard approximation technique (Moreau--Yosida
regularization) applied to the conventional Schr\"odinger ground state energy,
which imposes limits on the maximum curvature of the energy (w.r.t.\ the
magnetic field) and enables construction of a (Fr\'echet) differentiable
universal density functional.
