Long-Range Magnetic Force and Deformation Calculation Using the 2D Finite Element Method