# Efficient Parallel FDTD Method Based on Non-Uniform Conformal Mesh
## 2 Theory and Methods
### The Non-Uniform Conformal FDTD Algorithm
#### 2.1.2 Boundary Conditions  
Common boundary conditions include the electric boundary, magnetic boundary, periodic boundary, PML, etc. Among them, the electric boundary, magnetic boundary, and periodic boundary are relatively easy to implement in parallel, while absorbing boundaries are more complex and widely used in radiation, scattering, and other problems. In this paper, CPML absorbing-boundary conditions are adopted, and a parallel scheme is provided. Take the z-direction electric field component as an example (other components follow a similar logic). In stretched-coordinate space, the Maxwell's equations in the PML medium can be expressed as the following:  
\[j\omega\varepsilon E_{z}=s_{x}^{-1}\frac{\partial H_{y}}{\partial x}-s_{y}^{-1 }\frac{\partial H_{x}}{\partial y} \tag{6}\]  
where the coordinate stretching factor is given by the following:  
\[s_{\eta}=\kappa_{\eta}+\frac{\sigma_{\eta}}{\alpha_{\eta}+j\omega\varepsilon _{0}},\left(\eta=x,y,z\right) \tag{7}\]  
\(\kappa_{\eta}\), \(\sigma_{\eta}\), and \(\alpha_{\eta}\) are positive real numbers, and \(\kappa_{\eta}\geq 1\). In order to integrate the CPML absorbing-boundary algorithm with the non-uniform conformal FDTD algorithm, the discrete formulation of the Maxwell's equations in the CPML medium is provided [19]. This involves replacing the differential discretization equation with the integral discretization equation of the [PERSON]'s electromagnetic induction law for the CPML. The discrete formulation for the z-component of the electric field is given by the following:  
\[ \begin{array}{rl}E_{z}^{n+1}\Big{(}i,j,k+\frac{1}{2}\Big{)}=&\frac{2\varepsilon _{x}\varepsilon_{0}-\sigma\Delta t}{2\varepsilon_{0}+\sigma\Delta t}E_{z}^{n }\Big{(}i,j,k+\frac{1}{2}\Big{)}-\frac{2\Delta t}{2\varepsilon_{0}+\sigma \Delta t}\cdot\\ &\left[\frac{H_{y}^{n+1/2}\big{(}i+\frac{1}{2},j,k+\frac{1}{2}\big{)}-H_{y}^{ n+1/2}\big{(}i-\frac{1}{2},j,k+\frac{1}{2}\big{)}}{\kappa_{x}\big{(}i,j+\frac{1}{2} \big{)}h_{x_{i}}}\right.\\ &\left.-\frac{H_{x}^{n+1/2}\big{(}i,j+\frac{1}{2}k+\frac{1}{2}\big{)}-H_{x}^{ n+1/2}\big{(}i,j-\frac{1}{2},k+\frac{1}{2}\big{)}}{\kappa_{y}\big{(}i,j,k+\frac{1}{2} \big{)}h_{y}}\right]\\ &\left.+\psi_{ex}^{n+1/2}\Big{(}i,j,k+\frac{1}{2}\Big{)}-\psi_{ey}^{n+1/2} \Big{(}i,j,k+\frac{1}{2}\Big{)}\right]\\ \psi_{ex}^{n+1/2}\Big{(}i,j,k+\frac{1}{2}\Big{)}=&b_{x}\psi_{ex}^{n-1/2}\Big{(} i,j,k+\frac{1}{2}\Big{)}\\ &+a_{x}\frac{H_{y}^{n+1/2}\big{(}i+\frac{1}{2},j,k+\frac{1}{2}\big{)}-H_{y}^{ n+1/2}\big{(}i-\frac{1}{2},j,k+\frac{1}{2}\big{)}}{h_{x_{i}}}\\ \psi_{ey}^{n+1/2}\Big{(}i,j,k+\frac{1}{2}\Big{)}=&b_{y}\psi_{ey}^{n-1/2}\Big{(} i,j,k+\frac{1}{2}\Big{)}\\ &+a_{y}\frac{H_{x}^{n+1/2}\big{(}i,j+\frac{1}{2}k+\frac{1}{2}\big{)}-H_{x}^{n+1 /2}\big{(}i,j-\frac{1}{2},k+\frac{1}{2}\big{)}}{\kappa_{y}\big{(}i,j,k+\frac{1 }{2}\big{)}h_{y}}\end{array}  \tag{9}\]  
where  
\[a_{\eta}=\frac{\sigma_{\eta}}{\sigma_{\eta}\kappa_{\eta}+\alpha_{y}\kappa_{ \eta}^{2}}\left(e^{-(\sigma_{\eta}/\kappa_{\eta}+\alpha_{y})\frac{\Delta t}{ \varepsilon_{0}}}-1\right),b_{\eta}=e^{-(\sigma_{\eta}/\kappa_{\eta}+\alpha_{y })\frac{\Delta t}{\varepsilon_{0}}} \tag{11}\]  
component \(H_{y,z}(i,j,k)\) updated in process \(\mathrm{N}+1\) will be passed to process \(\mathrm{N}\) to update the electric field component at the interface. \[ \begin{split} E_{yx}(i,j,k)\text{ and }H_{x}(i,j,k)\text{ updated in processors N and N+1}\\ H_{yx}(i-1,j,k)\text{ updated in processors N}\\ \text{ Used as boundary condition in processors N+1}\end{split} \]  
From the perspective of reliability in parallel programming and the application of non-uniform conformal grids, adding virtual grid cells offers significant advantages. If the interfaces between subdomains coincide with material interfaces, in addition to transmitting magnetic field information, it is also necessary to transmit relevant conformal grid information and material information.