magnetic field simulation with rotationally symmetric boundary conditions