  We present a method and an implementation for smooth linear motion in a
finite difference-based micromagnetic simulation code, to be used in simulating
magnetic friction and other phenomena involving moving microscale magnets. Our
aim is to accurately simulate the magnetization dynamics and relative motion of
magnets while retaining high computational speed. To this end, we combine
techniques for fast scalar potential calculation and cubic b-spline
interpolation, parallelizing them on a Graphics Processing Unit (GPU). The
implementation also includes the possibility of explicitly simulating eddy
currents in the case of conducting magnets. We test our implementation by
providing numerical examples of stick-slip motion of thin films pulled by a
spring and the effect of eddy currents on the switching time of magnetic
nanocubes.
