IT SEEMS to me, that in the general context of 'David Copperfield', discipline as a positive concept has nothing to do with forced labour or exercise. Forced discipline is Murdstones' theology. Discipline and cruelty are combined in Mr. Creakle's concept of teaching. In chapter 6, where this combination is described by young David, we first encounter the word "discipline". Nevertheless, even painful discipline can be of some profit, and that happened when David had to work against his Aunt's misfortune - but this is an accident and doesn't seem to justify that kind of discipline.
The first positive evaluation of discipline in the novel comes in ch. 45, where Annie recollects her affair with Maldon. Discipline, in this context, seems to be the prerequisite to the ability of discerning truth, especially in love affairs. Discipline should make Annie see, that she didn't and couldn't love Maldon.
In chapter 45 we encounter for the first time the words "undisciplined heart", words that would impress David very much, since he thought, that his marriage with Dora might be wrong. Dora would totally uncover Maldon's real character only after many years. This kind of discipline should help one discover the presence or the lack of the common spiritual ground, the "suitability of mind and purpose", upon which true love and marriage are founded. This discernment of the real characteristics of a person is the act of discipline. However, this definition is not exhaustive - on the contrary, it can be very misleading.