A 3D micromagnetic code has been used for these calculations. The Landau-Lifshitz-Gilbert (LLG) equation has been solved with a semi-discretized approach.
The spatial discretization has been performed with the finite difference method. The magnetic body has been subdivided into a collection of N rectangular prisms with edges parallel to the coordinate axes (N = Nx × Ny × Nz, where Nx, Ny, Nz are the number of cells along the axes x, y, z respectively). The magnetization has been assumed uniform within each cell.
The exchange field has been computed by means of a 7-point laplacian discretization, which is second order accurate in space. The Neumann boundary condition has been taken into account on the boundary cells. The magnetostatic field has been written as a discrete convolution whose kernel was obtained by means of generalization to prism (non cubic) cells of the formulas proposed in Ref.  for cubic cells. Such discrete convolution has been computed by using 3D Fast Fourier Transform with zero-padding algorithm.
The time integration of the (spatially) semi-discretized LLG equation has been performed by using the (implicit) mid-point rule numerical technique. This technique is unconditionally stable and second order accurate with respect to the time step. In addition, when the mid-point rule scheme is applied to the LLG equation, it preserves the fundamental properties of the LLG dynamics, regardless of the time-step:
In all the computations, the time-step was constant and set to 2.5 ps. The magnetization has been assumed to have reached an equilibrium state when the maximum value of the normalized torque was less than 10-5.
To investigate the dependence of the numerical solution on the mesh
size, the same problem has been simulated with a smaller cell size,
namely 2.5 nm × 2.5 nm × 3 nm. Therefore, the thin-film has
been subdivided into
N = Nx × Ny × Nz =
200 × 50 × 1 = 10000 prism cells.
Next, we report the plot of < my > vs. time
with cell size 3.125 nm and 2.5 nm.