# Detecting Inverse Boundaries by Weighted High-Order Gradient Collocation Method
## 4 Numerical Implementation
### Annular Domains  
Consider three annular domains as discretized in Figure 7a-c, where these annular domains have different boundary conditions: half unknown outer boundary, half unknown inner boundary, and unknown inner boundary. In particular, the star denotes the symbol for points in the domain; the circle denotes the symbol for points imposed by Neumann and Dirichlet boundary conditions; the triangle denotes the symbol for the inner boundary points, as prescribed by the Dirichlet boundary condition. The governing equation is described by the following Laplace equation:  
\[\
abla^{2}u=0,R_{i}\leq r\leq R_{o},\;0\leq\theta<2\pi \tag{32}\]  
where \(R_{i}=0.5\) and \(R_{o}=1\). The general expressions for the boundary conditions in these three configurations are given by  
\[ \begin{split} u(R_{o},\theta)&=R_{o}^{2}\cos(2 \theta)\big{(}1+\frac{s}{100}\times rand\big{)},\,\beta_{1}\leq\theta\leq\beta _{2}\\ u_{n}(R_{o},\theta)&=2R_{o}\cos(2\theta)\big{(}1+ \frac{s}{100}\times rand\big{)},\,\beta_{1}\leq\theta\leq\beta_{2}\\ \end{split}  \tag{33}\]  
\[u(R_{i},\theta)=R_{i}^{2}\cos(2\theta),\,\beta_{3}\leq\theta\leq\beta_{4} \tag{34}\]  
where \(\beta_{i}\) denotes the angle corresponding to the prescribed boundary conditions as shown in Figure 7a-c, which satisfies \(0\leq\beta_{i}\leq\pi\). Along the missing boundary, \(u\) should satisfy the analytical solution given below:  
\[u=R_{o}^{2}\cos(2\theta) \tag{35}\]  
for the outer boundary or  
\[u=R_{i}^{2}\cos(2\theta) \tag{36}\]  
for the inner boundary. By using \(N_{s}=N_{c}=386\) and \(a=3d\), the contour plots of absolute errors (%) are depicted in Figure 8a-c. Obviously, large errors occur along the missing boundary with an extremely small magnitude of absolute errors. Upon using the quadratic basis to construct the RK and HG-RK shape functions, high accuracy of approximation to the quadratic polynomial is retained. Then, the outer  
Figure 7: Discretization of annular domains: (**a**) half unknown outer boundary; (**b**) half unknown inner boundary; (**c**) unknown inner boundary. boundary conditions are disturbed by some noise \(s=0,1,2,3\). The comparison between numerical solutions along the missing boundary and analytical solution is made in Figure 9a-c, from which great agreement is achieved even when \(s=3\). The maximal absolute errors (%) for \(u\), \(u_{x}\), and \(u_{y}\) obtained by various \(s\) are summarized Table 1, in which high accuracy is observed. The stability of the method in detecting the unknown boundary is demonstrated. As for the CPU calculation, HG-RKCM exhibits the most efficiency, as shown in Figure 10, while G-RKCM is more efficient than RKCM. Figure 8: Contour plots of absolute errors (%): (**a**) half unknown outer boundary; (**b**) half unknown inner boundary; (**c**) unknown inner boundary. \begin{table}
\begin{tabular}{c c c c c c} \hline  & \(s\) & **0** & **1** & **2** & **3** \\ \hline \multirow{3}{*}{(a)} & \(u\) & \(6.2683\times 10^{-10}\) & 1.0422 & 2.3082 & 3.7493 \\  & \(u_{\times x}\) & \(6.2619\times 10^{-10}\) & 2.9022 & 4.7829 & 5.5098 \\  & \(u_{\times y}\) & \(1.2626\times 10^{-9}\) & 2.7713 & 4.9511 & 6.7354 \\ \hline \multirow{3}{*}{(b)} & \(u\) & \(3.4001\times 10^{-12}\) & 0.1038 & 0.2400 & 0.4209 \\  & \(u_{\times x}\) & \(2.8721\times 10^{-11}\) & 0.9011 & 1.8392 & 2.6904 \\  & \(u_{\times y}\) & \(2.2637\times 10^{-11}\) & 0.8725 & 1.7428 & 1.7441 \\ \hline \multirow{3}{*}{(c)} & \(u\) & \(3.6526\times 10^{-12}\) & 0.2722 & 0.3525 & 0.5416 \\  & \(u_{\times x}\) & \(1.8374\times 10^{-11}\) & 1.2760 & 1.7217 & 1.9987 \\  & \(u_{\times y}\) & \(1.6998\times 10^{-11}\) & 1.1475 & 1.5912 & 2.0693 \\ \hline \end{tabular}
\end{table} 
Table 1: Comparison of maximal absolute errors (%) obtained by various \(s\): (a) half unknown outer boundary; (b) half unknown inner boundary; (c) unknown inner boundary.