Matrix-free time-domain methods for general electromagnetic analysis