Hello everyone, I know that pre-main sequence stars do heat up because of gravitational contraction, and the increase in internal energy (and so in temperature) comes from this shrinking and is governed by the virial theorem ( http://www.astro.wisc.edu/~townsend/resource/teaching/astro-310-F08/19-stellar-energy.pdf) . In the previous link they say that only those stars who haven't still ignited hydrogen in their core contract the way the virial theorem states. But I've been told that throughout its whole life a star contracts to increase its temperature, and the virial thm is obviously valid in every moment of a star's life since it only requires hydrostatic equilibrium. Why should the contraction stop then when it comes to H ignition? I know that also nuclear reactions can play a role in making the temperature rise. So, who is wrong? Thanks everyone!