PurposeThe use of the prominent FDTD method for the time domain solution of electromagnetic wave propagation past devices with small geometrical details can require very fine grids and can lead to very important computational time and storage. The purpose is to develop a numerical method able to handle possibly non‐conforming locally refined grids, based on portions of Cartesian grids in order to use existing pre‐ and post‐processing tools.Design/methodology/approachA Discontinuous Galerkin method is built based on bricks and its stability, accuracy and efficiency are proved.FindingsIt is found to be possible to conserve exactly the electromagnetic energy and weakly preserves the divergence of the fields (on conforming grids). For non‐conforming grids, the local sets of basis functions are enriched at subgrid interfaces in order to get rid of possible spurious wave reflections.Research limitations/implicationsAlthough the dispersion analysis is incomplete, the numerical results are really encouraging it is shown the proposed numerical method makes it possible to handle devices with extremely small details. Further investigations are possible with different, higher‐order discontinuous finite elements.Originality/valueThis paper can be of great value for people wanting to migrate from FDTD methods to more up to date time‐domain methods, while conserving existing pre‐ and post‐processing tools.