Density-functional theory of solid-to-solid isostructural transitions