# Meshfree Variational-Physics-Informed Neural Networks (MF-VPINN): An Adaptive Training Strategy
## 3 Numerical Results
### Extension to More a Complex Domain  
In this section, we present some ideas that can be used to apply the method to more complex domains. Let us consider a domain \(\Omega_{2}\) with some internal holes and boundary \(\partial\Omega_{2}=\Gamma_{2}\). In particular, \(\Omega_{2}=(0,1)^{2}\backslash\left(\cup_{i=1}^{4}H_{i}\right)\), where \(H_{i}\), \(i=1,2,3,4\) are rectangular holes with centers \(\mathbf{c}_{H_{i}}\) defined as  
\[\mathbf{c}_{H_{1}} =\left(\frac{9}{26},\frac{9}{34}\right), \mathbf{c}_{H_{2}} =\left(\frac{17}{26},\frac{9}{34}\right),\] \[\mathbf{c}_{H_{3}} =\left(\frac{9}{26},\frac{25}{34}\right), \mathbf{c}_{H_{4}} =\left(\frac{17}{26},\frac{25}{34}\right),\]  
and basis and height equal \(\frac{1}{26}\) and \(\frac{1}{34}\), respectively. In this domain, we consider the Poisson problem:  
\[ \begin{cases}-\Delta u=f&\text{in}\ \ \Omega_{2}\,,\\ u=g&\text{on}\ \ \Gamma_{2}\,,\end{cases}  \tag{35}\]  
with \(f\) and \(g\) such that the exact solution is  
\[ \begin{split} u(x,y)&=\frac{1}{C_{u}}\bigg{[}x(x-1) \bigg{(}x-\frac{4}{13}\bigg{)}\bigg{(}x-\frac{5}{13}\bigg{)}\bigg{(}x-\frac{8} {13}\bigg{)}\bigg{(}x-\frac{9}{13}\bigg{)}\cdot\\ y(y-1)\bigg{(}y-\frac{4}{17}\bigg{)}\bigg{(}y-\frac{5}{17}\bigg{)} \bigg{(}y-\frac{12}{17}\bigg{)}\bigg{(}y-\frac{13}{17}\bigg{)}\bigg{]},\end{split}  \tag{36}\]  
normalized through the constant \(\frac{1}{C_{u}}\) to assume value \(1\) in \(\big{(}\frac{2}{13},\frac{2}{17}\big{)}\). This function is represented in Figure 16.  
We extend the approaches proposed in Section 3.2 by adding a cutting procedure after the generation of the new patches. Note that, in particular, all the patches are already completely inside the square \([0,1]^{2}\) when we apply the cutting procedure, and we can thus focus only on the holes. When a patch intersects more than one hole, we recursively remove it from \(\mathcal{P}_{m}\), we subdivide the corresponding region in 4 overlapping patches, and we add them to \(\mathcal{P}_{m}\) until all the generated patches intersect at most one hole. Moreover, we observe that the region \(P_{i}\backslash H_{j}\) inside the patch \(P_{i}\in\mathcal{P}_{m}\) and outside the hole \(H_{j}\), \(j=1,2,3,4\), can always be covered by the union of at most four rectangles. When a generated patch intersects a hole, we thus remove the patch and generate the minimum number of patches (at most four) that are as large possible and whose union is the region \(P_{i}\backslash H_{j}\). To avoid numerical instabilities, when this cutting procedure generates a patch with an aspect ratio larger than 100 or with an area more than 100 times smaller than the original uncutted patch, the new patches are removed from \(\mathcal{P}_{m}\). This implies that it is not possible to remove the patches associated with the highest error indicators as in _Strategy #3_ because  
Figure 15: _Strategy #4: Patches used to train the MF-VPINN with \(C_{M}=9\). Each dot represents a patch \(P_{i}\), its position is the center \(\mathbf{c}_{P_{i}}\) of the patch, its size is proportional to the patch size \(h_{i}^{2}\), and its color is associated with the quantity \(r_{h,i}^{2}(u^{\mathcal{N}\backslash\mathcal{N}})\). (**a**) Representation of \(\mathcal{P}_{1}\); (**b**) Representation of \(\mathcal{P}_{2}\); (**c**) Representation of \(\mathcal{P}_{3}\); (**d**) Representation of \(\mathcal{P}_{4}\); (**e**) Representation of \(\mathcal{P}_{5}\); (**f**) Representation of \(\mathcal{P}_{6}\). otherwise, the union of all the patches would not cover the entire domain. We thus present numerical results only for _Strategy #1_ and _Strategy #2_. The obtained error decays are shown in Figure 17 for _Strategy #1_ and _Strategy #2_ with \(C_{M}=4\) and \(C_{M}=9\). The first and second errors are computed with the patches generated by cutting the patches in \(\mathcal{P}_{0}\) and \(\mathcal{P}_{1}\), respectively, whereas the third and fourth errors are obtained by refining the previous patches with the error indicator as previously described.