## 2 Theoretical Foundations
### Comparative Analysis in Homogeneous Elastic Anisotropic Media  
In the previous section, we verified that M-PML is superior to PML in terms of stability. However, the absorption performance advantages of M-PML and PML were not compared. Therefore, in this section, wavefield simulations are performed using M-PML and PML in different anisotropic media to compare the absorption of the two boundary conditions by observing the time-domain wavefield snapshots and comparing the energy curves. The energy of the wavefield snapshot is the sum of the squares of the amplitude values of each point in the wavefield. Then, the energy decay curve is obtained for each moment of the wavefield snapshot and plotted as a curve with the horizontal axis of time and the vertical axis of amplitude. In the first test, the physical properties are given in Table 1: medium 1. We set the model size to be 1.0 km \(\times\) 1.0 km with a grid space of 2.5 m, and employed an explosive Ricker wavelet source with a dominant frequency of 20 Hz. Figure 5 exhibits snapshots of horizontal displacement and its corresponding analytical group velocity calculated from medium 1. These snapshots were simulated using PML and M-PML, respectively, at different times. Figure 5a,b are the snapshots computed inside the PML and M-PML at 0.1667 s. The consistency between the wavefront calculated from the analytical group velocity and the wavefront of snapshots can be observed in Figure 5c. Similar to the figures above, Figure 5d-f are recorded at 0.2444 s. The wavefront of snapshots is almost the same as the wavefront calculated from the analytical group velocity, and the absorptive capacity of M-PML is superior to that of PML at four corners. Figure 5g,h are recorded at 0.7 s, and the absorptive advantage of M-PML over PML can be observed. Figure 5i shows the wavefield energy decay curves in the computational domain. These results show that the absorption performance of M-PML is better than that of PML when both ABCs remain stable, which can be verified by the comparative observations in Figure 5g,h. Because at 0.7 s, the effective wavefield has all propagated within the boundary, while the boundary reflections observed in PML are stronger at this time, and that of M-PML is much weaker. To further quantitatively compare the performance of the two ABCs, we gave the energy curves of them, where the horizontal axis is time, and the vertical axis is the logarithm of energy, and we can see that the energy of the waves of both ABCs becomes weaker as time passes, but the energy of M-PML decays faster than that of PML. In addition, in order to verify the absorptive capacity and reliability of M-PML in viscous media, the wavefield snapshots of M-PML in viscoelastic anisotropic media are given in Figure 6. From these results, we know that M-PML is still effective in viscous anisotropic media. Regarding the verification of the results, we calculated the wavefront using the analytical group velocity in anisotropic media [31], and the results are displayed in Figure 5c,f, where the fast propagating wavefront is the P-wave, and the slow one is the S-wave. It can be seen that the wavefield snapshots at the corresponding moment also contain P-waves and S-waves. The wavefront in snapshots can correspond well with the analytical wavefront in Figure 5c,f, which illustrates the reasonableness and applicability of the numerical results. We further tested our algorithm with medium 2 in this test. The physical properties are given in Table 1. We also set the model size to be 1.0 km \(\times\) 1.0 km with a grid space of 2.5 m and employed an explosive Ricker wavelet source with a dominant frequency of 20 Hz. Figure 7 shows snapshots of horizontal displacement and its analytical wavefront calculated from medium 2. These snapshots are calculated within the PML and M-PML boundary conditions, respectively.