Relaxation in elastic and viscoelastic materials