Continuum mechanics and field theory: Thomson and Maxwell