Stav dette: Electric machine analysis using tensors