Computation of magnetic fields in electrical fields in electrical machines by self adaptive finite element method