Continuum damage mechanics revised: A principle for mechanical and thermal equivalence