# Integration of Polynomials Times Double Step Function in Quadrilateral Domains for XFEM Analysis
## 4 Results
### Library Architecture  
The library source code is freely available and usable. The fundamental file of the library is _dd_epol.f90_, in which the algorithm to map the discontinuities from the global coordinate system to the parent coordinate system (retrieving their coefficients) and the algorithm to evaluate the equivalent polynomial functions \(\hat{H}_{i}(\mathbf{x})\) are contained. Other files that include the coefficients' analytical expressions, required to evaluate the equivalent polynomial functions, complete the system. Table 1 contains a list of the monomials that the integrand polynomial function can be made up of. Nevertheless, in each of the analysed domains, the library may be extended to any polynomial degree. Note that the method provides exact results for constant Jacobian and approximate results for non-constant Jacobian [13; 19].  
The library is completed by the module file _class_Quad.f90_, which contains the 2D square finite element Class and all the methods needed to perform the element isoparametric mapping and to evaluate the integral in (25). The module file _i_functions.f90_, containing the methods to handle the data input via text file, is also provided. A main program file, _main.f90_, which implements both the library and the 2D square element Class is provided for the purpose of usage demonstration. The practical use of the library follows these steps:  
1. Primary data preparation: * Individual of the domain nodal coordinates in the global coordinate system; * Individuation of the discontinuities coefficients in the global coordinate system; * Selection of the domain portions to be evaluated.
2. Isoparametric mapping onto the parent element domain and computation of the coefficient vector of the equivalent polynomial by means of the _DD_He  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Domain of** & **\(\mathbf{Etype}\)** & **Parent Domain** & **Monomial Basis** \\ \hline \hline \end{tabular}
\end{table}
Table 1: Integration domain, domain type, parent element domain and monomial basis included in the library.  
Quadrature by way of any chosen rule (i.e., (25)) in which the equivalent polynomial values at the quadrature points are provided by the function _HeqPol_ and the Jacobian matrix determinant is given by the function _detl_.  
In order to obtain exact quadrature results by means of the current version of the library, the following conditions have to be met:  
* The Jacobian of the transformation in (25) has to be constant;
* The polynomial \(p_{n}\) in (22) is a linear combination of the monomials presented in Table 1.  
It should be noted that two calls are needed if users seek to directly incorporate the core of the library into their own quadrature algorithm: one call to the subroutine _Heqpol_coefficients_ for each integration domain (step 2, mentioned previously), and one to the function _HeqPol_ for each quadrature point (step 3, mentioned previously). Notice that users can add their own quadrature algorithm directly into the element Class. In this case, a new method has to be defined within the element Class and a call to this method in the _EvalQuad_ and _EvalQuadFromFile_ subroutines has to be foreseen.