  A novel approach to computing time-harmonic solutions of Maxwell's equations
by time-domain simulations is presented. The method, EM-WaveHoltz, results in a
positive definite system of equations which makes it amenable to iterative
solution with the conjugate gradient method or with GMRES. Theoretical results
guaranteeing the convergence of the method away from resonances is presented.
Numerical examples illustrating the properties of EM-WaveHoltz are given.
