  We propose a general framework for solving the Einstein equation for static
and Euclidean metrics. First, we address the issue of gauge-fixing by borrowing
from the Ricci-flow literature the so-called DeTurck trick, which renders the
Einstein equation strictly elliptic and generalizes the usual
harmonic-coordinate gauge. We then study two algorithms, Ricci-flow and
Newton's method, for solving the resulting Einstein-DeTurck equation. We
illustrate the use of these methods by studying localized black holes and
non-uniform black strings in five-dimensional Kaluza-Klein theory, improving on
previous calculations of their thermodynamic and geometric properties. We study
spectra of various operators for these solutions, in particular finding
negative modes of the Lichnerowicz operator. We classify the localized
solutions into two branches that meet at a minimum temperature. We find good
evidence for a merger between the localized and non-uniform solutions. We also
find a narrow window of localized solutions that possess negative modes yet
appear to have positive specific heat.
