The materials science is what is happening 'inside' the beam. The structural mechanics are the effects on the beam as a whole. They both are relevant, but in structural analysis we take all the hard work of the materials guys and bubble it down to a few constants (E, G, nu, etc)