  We describe algorithms for finding harmonic cochains, an essential ingredient
for solving elliptic partial differential equations in exterior calculus.
Harmonic cochains are also useful in computational topology and computer
graphics. We focus on finding harmonic cochains cohomologous to a given
cocycle. Amongst other things, this allows localization near topological
features of interest. We derive a weighted least squares method by proving a
discrete Hodge-deRham theorem on the isomorphism between the space of harmonic
cochains and cohomology. The solution obtained either satisfies the Whitney
form finite element exterior calculus equations or the discrete exterior
calculus equations for harmonic cochains, depending on the discrete Hodge star
used.
