The theory and application of a novel scaled boundary finite element method in computational electromagnetics