  We derive a formula that expresses the density of states of a system with
continuous degrees of freedom as a function of microcanonical averages of
squared gradient and Laplacian of the Hamiltonian. This result is then used to
propose a novel flat-histogram Monte Carlo algorithm, which is tested on a
three-dimensional system of interacting Lennard-Jones particles, the O(n)
vector spin model on hypercubic lattices in D = 1 to 5 dimensions, and the O(3)
Heisenberg model on a triangular lattice featuring frustration effects.
