  We present a fast direct solver for the simulation of electromagnetic
scattering from an arbitrarily-shaped, large, empty cavity embedded in an
infinite perfectly conducting half space. The governing Maxwell equations are
reformulated as a well-conditioned second kind integral equation and the
resulting linear system is solved in nearly linear time using a hierarchical
matrix factorization technique. We illustrate the performance of the scheme
with several numerical examples for complex cavity shapes over a wide range of
frequencies.
