Numerical calculation of fringing—field integrals for arbitrary electrode (magnetic pole) structures