Applications of Lagrangian field theory in the computational modeling of beam-wave interactions