The cohomology of an isospectral flow