Numerical Solution of Maxwell's Equations for Static, Resonant and Transient Problems