  We propose a high-order FDTD scheme based on the correction function method
(CFM) to treat interfaces with complex geometry without increasing the
complexity of the numerical approach for constant coefficients. Correction
functions are modeled by a system of PDEs based on Maxwell's equations with
interface conditions. To be able to compute approximations of correction
functions, a functional that is a square measure of the error associated with
the correction functions' system of PDEs is minimized in a divergence-free
discrete functional space. Afterward, approximations of correction functions
are used to correct a FDTD scheme in the vicinity of an interface where it is
needed. We perform a perturbation analysis on the correction functions' system
of PDEs. The discrete divergence constraint and the consistency of resulting
schemes are studied. Numerical experiments are performed for problems with
different geometries of the interface. A second-order convergence is obtained
for a second-order FDTD scheme corrected using the CFM. High-order convergence
is obtained with a corrected fourth-order FDTD scheme. The discontinuities
within solutions are accurately captured without spurious oscillations.
