Then the r and z components of the magnetic field as functions of r and z are calculated from the total magnetic potential by use of a high-accuracy finite-difference scheme.
For the finite-difference calculations, the program generates nonuniform two-dimensional computational meshes from nonuniform one-dimensional meshes.