# Integration of Polynomials Times Double Step Function in Quadrilateral Domains for XFEM Analysis
## 4 Results
### Numerical Examples
#### 4.2.1 Parallelogram Partitioned by Two Discontinuities Intersecting within the Element  
The parallelogram element \(\tilde{\Omega}\) shown in Figure 5a as a part of a bigger body discretisation is examined in the first example. All dimensions are in meters. The element is crossed by two discontinuities, described by means of the lines \(q\) and \(r\):  
* \(q:\frac{7}{4}x-y-\frac{7}{2}=0\);
* \(r:\frac{7}{4}x+y-\frac{21}{2}=0\).  
and split into the subdomains \(\tilde{\Omega}_{A}\), \(\tilde{\Omega}_{B}\), \(\tilde{\Omega}_{C}\) and \(\tilde{\Omega}_{D}\). The objective is to evaluate the inertia tensor and the area of \(\tilde{\Omega}_{B}\), namely solving the integral in (26) by means of the proposed formulation without subdividing the integration domain \(\tilde{\Omega}\).  
\[\int_{\Omega}\mathbf{m}(\mathbf{x})H_{q}(\mathbf{x})H_{r}(\mathbf{x})\,\mathrm{d}\Omega \tag{26}\]  
where vector \(\mathbf{m}(\mathbf{x})\) contains the monomial basis listed in Table 1 and \(H_{q}(\mathbf{x})\) and \(H_{r}(\mathbf{x})\) are the step functions for each discontinuity line (see (4)). Note that the normal to each discontinuity line has to be accurately defined for the sake of obtaining the targeted domain portion (as discussed in Section 3.3).  
The software maps the parallelogram \(\tilde{\Omega}\) onto the parent coordinate system, which is used to compute \(\tilde{H}_{B}(\mathbf{x})\) and carry out the integration.  
After launching the library example program, the user has to choose whether to input the data manually as the program executes or select an input data file.  
Input from file? (y/n): y example_1.txt  
For the first example, the input data is provided by the text file _example_1.txt_.  
```
\DOUBLE DISCONTINUITY EQP LIBRARY \EXAMPLE 1: DISCONTINUITIES INTERSECTING INSIDE THE DOMAIN $ElementType \L 21 : Quad 21 $Coords \L Set the coordinates for the element \L 1 st col : x \L 2 nd col : y \L Coordinates Scheme : \L Quad Element : \L 4
``` \L 4 ``` \L | | \L | \L | \L | \L | \L | \L | \L | \L | \L | \L | \L | \L | \L | \L 1 - \L 2.0 1.5 6.0 2.5 4.5 4.0 0.5 3.0 $NumOfDiscont \L Number of discontinuities crossing the element (1 or 2) 2 $DiscontCoefficients \L a,b,c coefficients for each discontinuity \L coefficients are separated by a blank 1.75 -1.0 -3.5 1.75 1.0 -10.5 $ElementPart \L In case of 2 discontinuities choose the element portion \L to integrate  
Figure 5: Software illustrative examples. (**a**) Example 1: parallelogram domain cut by two discontinuities intersecting inside the domain. (**b**) Example 2: parallelogram domain cut by two discontinuities intersecting outside the domain.  
The results produced by the library for the area \(A\) and the inertia tensor \(\mathbf{I}\) of \(\hat{\Omega}_{\mathcal{C}}\), evaluated with respect to the global coordinate system \((x,y)\), are:  
\[A=6.450\ \mathrm{m}^{2} \tag{29}\]  
\[\mathbf{I}=\rho_{s}\begin{bmatrix}50.817&-58.396\\ -58.396&78.392\end{bmatrix}\text{(units: kg}\,\mathrm{m}^{2}) \tag{30}\]  
where \(\rho_{s}\) is the material surface density (\(\mathrm{kg}/\mathrm{m}^{2}\)). As in the example in Figure 5a, the integral in (26), computed above by means of the _DD_EQP_ library, has also been evaluated numerically by means of the method proposed in [26], via the adaptive integration strategy _NIntegrate_ of the software _Wolfram Mathematica_, and by way of definite integral computation after defining the integration subdomain \(\hat{\Omega}_{\mathcal{C}}\). Once again, the obtained results coincide to the level of machine precision for all evaluation methods, as shown in Table 2.