# Meshfree Variational-Physics-Informed Neural Networks (MF-VPINN): An Adaptive Training Strategy
## 3 Numerical Results
### Adaptive Training Strategies
In the numerical experiments, we use \(A_{\text{ratio}}=1.25\). This way, it is possible to allow the new patches to overlap and keep the area of the region \(P_{i}\backslash\Bigl{(}\bigcup_{k=1}^{C_{M}}P_{i}^{k}\Bigr{)}\) reasonably small. Figure 2: Graphical representation of the solution \(u\) in (29). We remark that, with this strategy, it may happen that some patches are outside \(\Omega\). In order to avoid this risk, we move the centers \(\tilde{\mathbf{c}}_{P_{i}^{k}}\) to obtain the actual patches centers \(\mathbf{c}_{P_{i}^{k}}\) as follows:  
\[\mathbf{c}_{P_{i}^{k}}=(x_{i}^{k},y_{i}^{k})\leftarrow\left(\max\left\{\min\left\{ \tilde{x}_{i}^{k},1-\frac{h_{i}^{k}}{2}\right\},\frac{h_{i}^{k}}{2}\right\}, \max\left\{\min\left\{\tilde{y}_{i}^{k},1-\frac{h_{i}^{k}}{2}\right\},\frac{h_ {i}^{k}}{2}\right\}\right). \tag{32}\]  
We remark that, when the patch \(P_{i}\) is very close to a vertex of the domain, it is possible that multiple original centers \(\tilde{\mathbf{c}}_{P_{i}^{k}}\) are such that the distance of both \(\tilde{x}_{i}^{k}\) and \(\tilde{y}_{i}^{k}\) from the \(x\) and \(y\) coordinates of the domain vertex is smaller than \(h_{i}^{k}/2\). In this case, it is important to consider the random coefficient \(\lambda\) in the definition of \(h_{i}^{k}\) to avoid updating all these centers with the same point; otherwise, multiple new patches would coincide (because they would share the same center and size). For the numerical test, we consider \(C_{M}=4\) and \(C_{M}=9\). Using significantly more accurate quadrature rules, we compare the approximate solution with the exact one defined in (29) and compute the relative \(H^{1}\) error \(\|u-u^{\mathcal{NN}}\|_{1}/\|u\|_{1}\) at the end of each training iteration. The obtained errors are shown as blue circles (\(C_{M}=4\)) and red triangles (\(C_{M}=9\)) in Figure 3. It can be noted that, with both values of \(C_{M}\), when more patches are used, the error is smaller, even though the convergence rate is limited by the low regularity of the solution. It is also interesting to observe the positions and sizes of the used patches; such information is summarized in Figures 4 and 5. In such figures, each dot is in the center of a patch \(P_{i}\), and its size and color represent the size \(h_{i}^{2}\) and the scaled indicator \(\eta_{i}^{\gamma}\) associated with \(P_{i}\). It can be noted that, even if the new centers are chosen randomly in the few selected patches, the final distribution is the expected one. In fact, most of the patches cluster around the origin, whereas the rest of the domain is covered by fewer patches. Nevertheless, we highlight that, when \(C_{M}=9\), there are more small and medium patches far from the origin, yielding a more uniform covering of the areas far from the singular point and a slightly better accuracy. _Strategy #2: Fixed patch centers_  
From the results discussed in _Strategy #1_, it can be observed that choosing the position of the new centers randomly may lead to non-uniform patch distribution in regions far from the singular point. In order to obtain better distributions, let us fix a priori the position of the new centers. Let us consider the reference patch \(\hat{P}=(0,1)^{2}\) and the points  
\[ \begin{split}\hat{\mathbf{c}}_{1}&=(0.25,0.25),\qquad \quad\hat{\mathbf{c}}_{2}=(0.75,0.25),\\ \hat{\mathbf{c}}_{3}&=(0.25,0.75),\qquad\quad\hat{\mathbf{c} }_{4}=(0.75,0.75),\end{split}  \tag{33}\]  
when \(C_{M}=4\) and  
\[ \begin{split}\hat{\mathbf{c}}_{1}&=(0.2,0.2),\qquad \quad\hat{\mathbf{c}}_{2}=(0.2,0.5),\qquad\quad\hat{\mathbf{c}}_{3}=(0.2,0.8),\\ \hat{\mathbf{c}}_{4}&=(0.5,0.2),\qquad\quad\hat{\mathbf{c}}_{5 }=(0.5,0.5),\qquad\quad\hat{\mathbf{c}}_{6}=(0.5,0.8),\\ \hat{\mathbf{c}}_{7}&=(0.8,0.2),\qquad\quad\hat{\mathbf{c}}_{8 }=(0.8,0.5),\qquad\quad\hat{\mathbf{c}}_{9}=(0.8,0.8),\end{split}  \tag{34}\]  
when \(C_{M}=9\).