Electromagnetic Radiation: Variational Methods, Waveguides And Accelerators