The Maxwell equations with charges and currents are studied in a time domain. The boundary of the region where the Maxwell equations are solved can include reentrant corners or edges. These singularities give rise to difficulties because they generate strong electromagnetic fields. The method presented is based on a splitting of the spaces of solutions into a two-term direct sum. Several numerical applications are given.