# An Efficient and Accurate Adaptive Time-Stepping Method for the Landau-Lifshitz Equation
## 3 Computational Experiments
### Non-Periodic Forcing Term  
In this section, we present a computational experiment that rapidly changes over time. The proposed time adaptive approach has its strength where the change of the solution is rapid and diverse during the numerical simulation. Therefore, we apply the following exact solution and corresponding forcing term in Equation (10):  
\[\mathbf{m}^{e}(x,t) = \begin{pmatrix}u^{e}(x,t)\\ v^{e}(x,t)\\ w^{e}(x,t)\end{pmatrix} = \begin{pmatrix}\cos(x^{2}(1-x)^{2})\sin(100t^{2})\\ \sin(x^{2}(1-x)^{2})\sin(100t^{2})\\ \cos(100t^{2})\end{pmatrix} , \tag{12}\] \[\mathbf{f} = \mathbf{m}_{t}+\mathbf{m}\times\mathbf{m}_{xx}\] (13) \[= \begin{pmatrix}200t\cos(X)\cos(100t^{2})+[(X^{\prime})^{2}\sin(X) -X^{\prime\prime}\cos(X)]\sin(100t^{2})\cos(100t^{2})\\ 200t\sin(X)\cos(100t^{2})+[(X^{\prime})^{2}\cos(X)+X^{\prime\prime}\sin(X)] \sin(100t^{2})\cos(100t^{2})\\ -200t\sin(100t^{2})+X^{\prime\prime}\sin^{2}(100t^{2})\end{pmatrix} . \tag{14}\]  
To show the rapid change of the solution over time, Figure 5 illustrates the exact solution \(w^{e}(x,t)=\cos(100t^{2})\). The forcing term introduced in this section is no longer periodic. Therefore, we use the homogeneous Neumann boundary condition instead of the periodic boundary condition. Therefore, \(\mathbf{m}_{0}=\mathbf{m}_{1}\) and \(\mathbf{m}_{N_{x}+1}=\mathbf{m}_{N_{x}}\) is applied. On the computational domain \((0,\ 1)\) with \(h=1/128\), we apply tolerance \(5\times 10^{-7}\), maximum time step size \(\Delta t_{\text{max}}=0.005h^{2}\) and find the numerical solution at final time \(T=0.3\). Snapshots of the computational results at \(t=0.01,\ 0.07\) and \(0.1\) are illustrated in Figure 5(a)-c, respectively. Figure 5(d)-i shows the numerical solutions and difference between the numerical solution and exact solution of \(u\), \(v\) and \(w\) from left to right. For error comparison, we use the discrete maximum error defined as follows:  
\[\|\mathbf{m}-\mathbf{m}^{e}\|=\max\{|u-u^{e}|+|v-v^{e}|+|w-w^{e}|\}.\]  
The execution time  
Next, we present a comparison between the proposed adaptive time step method and the constant time step methods: the explicit method and the Crank-Nicolson method studied by [PERSON] and [PERSON] [4]. [PERSON] and [PERSON] proposed a finite difference method for the LL equation using the Crank-Nicolson method and multigrid method for handling nonlinearities. Figure 8 shows the numerical results for the explicit method with constant time step \(\Delta t=1.3737\times 10^{-8}\). Figure 8a-c show the temporal evolution of the numerical solutions at \(t=0.01\), \(t=0.07\), and \(t=0.1\), respectively. Figure 8d-f show the numerical and analytic solutions of \(u\), \(v\), and \(w\) at \(t=0.3\). Figure 8g-i show the difference between the numerical and analytic solutions for \(u\), \(v\), and \(w\). The execution time is \(901.6647\) s, and the maximum error is \(1.57\times 10^{-5}\). Figure 6: Numerical solutions for the proposed adaptive method at (**a**) \(t=0.01\), (**b**) \(t=0.07\), and (**c**) \(t=0.1\). Numerical and analytic solutions of (**d**) \(u\), (**e**) \(v\), and (**f**) \(w\) at \(t=0.3\). The differences between the exact solution and the numerical solutions (**g**) \(u\), (**h**) \(v\), and (**i**) \(w\) at \(t=0.3\). Figure 7: Desired adaptive time step \(\Delta t\) for each time. Adaptive time steps enhance the efficiency of the method. Under the equal benchmark problem, we applied constant time step \(\Delta t=2\times 10^{-8}\). Figure 9 shows numerical results for the Crank-Nicolson method with a constant time step. The first row of Figure 9 shows the temporal evolution of the numerical solutions at \(t=0.01\), \(t=0.07\), and \(t=0.1\). The second row of Figure 9 shows the numerical and analytic solutions of \(u\), \(v\), and \(w\) at \(t=0.3\). The last row of Figure 9 shows the difference between the numerical and analytic solutions for \(u\), \(v\), and \(w\). The execution time is \(1123.6650\) s, and the maximum error is \(1.02\times 10^{-5}\).