A discontinuous energy–density functional