Numerical methods for the evolution of fields with applications to plasmas