The Thermoelastic and Viscoelastic Contact of Two Rods