Welding causes distortion due to differential heating and cooling rates during the process. When heat is applied to part of a structure, it expands locally. If the structure is restrained from expanding uniformly, compressive and tensile stresses develop which can result in distortion. Three factors influence distortion: 1) temperature gradients between regions of the structure, 2) restraint from thermal expansion, and 3) yield strength and modulus of the material at welding temperatures. Distortion can be controlled by techniques such as pre-setting parts, clamping during welding, and post-weld heat treatment.