This repository contains code used for the paper "Efficient calculation of self magnetic field, self-force, and self-inductance for electromagnetic coils. II. Rectangular cross-section", by M Landreman, S Hurwitz, and T M Antonsen Jr. It provides an efficient method to compute the magnetic field inside a conductor as well as the self-inductance and the Lorentz force associated with this self-field.