## 2 Methods
### Multistencil Fast Marching Method
Figure 5b,d shows the first-order and second-order computational and theoretical travel time contours of the MSFM algorithm, respectively. It can be seen from the graph that when the two algorithms offer the same first-order approximation or the same second-order approximation, the difference between the calculated value and the theoretical  
Figure 4: The homogeneous model and its theoretical travel time contour; (**a**) homogeneous model map; (**b**) theoretical travel time contour. Figure 5: Calculating the travel time and theoretical travel time contours. (**a**) First-order fast marching method (FMM); (**b**) first-order MSFM; (**c**) second-order FMM; (**d**) second-order MSFM. value of MSFM is smaller than that of FMM. In the case of the second-order approximation, the difference between the calculated value and the theoretical value of the two algorithms is obviously smaller than that of the first-order approximation. Among them, the travel time calculation value of the second-order MSFM almost coincides with its theoretical value, which shows that its calculation accuracy is the highest. In order to compare the computational accuracy and efficiency of the two algorithms, two mesh spacings and three error indices are used to test the first-order and second-order of FMM and MSFM, respectively. The error indexes are as follows:  
\[\max\left(\frac{T_{i,j}-T_{1}}{h},0\right)^{2}+\max\left(\frac{T_{i,j}-T_{2}}{ h},0\right)^{2}=S_{i,j}^{2} \tag{16}\]0  
\[\max\left(\frac{T_{i,j}-T_{1}}{h},0\right)^{2}+\max\left(\frac{T_{i,j}-T_{2}}{ h},0\right)^{2}=S_{i,j}^{2} \tag{16}\]1  
\[\max\left(\frac{T_{i,j}-T_{1}}{h},0\right)^{2}+\max\left(\frac{T_{i,j}-T_{2}}{ h},0\right)^{2}=S_{i,j}^{2} \tag{16}\]2  
where \(T_{a}\) is the theoretical travel time, \(T\) is the computational travel time, and \(n\) is the total number of grid nodes. Table 1 lists the error and time-consuming data of the 2 m and 10 m grid spacing, the first-order FMM (FMM1), the second-order FMM (FMM2), the first-order MSFM (MSFM1), and the second-order MSFM (MSFM2). The data in the analysis table (Table 1) show that: From the perspective of calculation accuracy, the three kinds of errors in FMM and MSFM are very small, indicating a very high calculation accuracy. By observing the table data vertically, we can see that the error fluctuation of FMM and MSFM is small, demonstrating that both methods are relatively stable. When the table data are observed longitudinally, it can be seen that FMM1 \(>\) MSFM1 \(>\) FMM2 \(>\) MSFM2. The error of the second-order difference format is smaller than that of the first-order difference format, which fully verifies that the MSFM algorithm has higher calculation accuracy. From the perspective of computational efficiency, there are two main parts: the time-consuming calculation and the time-consuming operation. The MSFM algorithm requires two templates, while the FMM algorithm only needs to use one template for calculation. In theory, the MSFM algorithm should consume twice as much time as the FMM algorithm. However, the operations for inserting and removing the two algorithms in the narrow band are the same. Table 1 shows that the time-consuming \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Grids** & & & **100 \(\times\) 100** & \\ \hline
**Method/Error** & \(\mathbf{L_{1}}\) & \(\mathbf{L_{2}}\) & \(\mathbf{L_{\max}}\) & **Time/seconds** \\ \hline
**FMM1** & 0.746 & 0.697 & 1.315 & 1.011 \\ \hline
**MSFM1** & 0.607 & 0.446 & 0.973 & 1.164 \\ \hline
**FMM2** & 0.197 & 0.042 & 0.329 & 1.054 \\ \hline
**MSFM2** & 0.040 & 0.003 & 0.188 & 1.288 \\ \hline
**Grids** & & & **500 \(\times\) 500** & \\ \hline
**Method/Error** & \(\mathbf{L_{1}}\) & \(\mathbf{L_{2}}\) & \(\mathbf{L_{\max}}\) & **Time/seconds** \\ \hline
**FMM1** & 1.055 & 1.538 & 2.062 & 24.428 \\ \hline
**MSFM1** & 0.915 & 1.116 & 1.657 & 29.334 \\ \hline
**FMM2** & 0.175 & 0.035 & 0.329 & 26.674 \\ \hline
**MSFM2** & 0.049 & 0.004 & 0.188 & 32.638 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Computational accuracy and efficiency of FMM and MSFM.