Clenching teeth and pressing tongue against roof of mouth
In Mahayana, we take such things as expression devices - not literal instructions. In this case clenched teeth are a pointer to great effort, great application of willpower.

The objectives of samatha are to disidentify from the mind, to learn to control attention, to acquire concentration/willpower, to integrate the disjointed layers of psyche, and generally to attain a "tamed", "pliable" mind.

It is towards these that we apply the great effort. Especially when the inappropriate thoughts arise, and if other techniques did not work (such as switching attention to antidotes and other techniques described in that sutra), as a last resort, we apply the sheer willpower.