Construction of enriched basis function
Level Set function
 XFEM is a local partition of a unity-based method where the key idea is to paste together special functions into the finite element approximation space to capture desired features in the solution. For crack modeling, a discontinuous jump function and asymptotic near-tip displacement fields are added to the displacement-based finite element approximation. The whole beauty of XFEM lies in subdividing the problem into two parts A) generating mesh without cracks/inclusions etc. B) enriching the FEM approximation with additional/enrichment functions that model the discontinuities. This avoids the need for re-meshing or explicit geometric modeling of the discontinuity. In general, XEM can be used to model cracks, contact and interface problems, simulation of inclusions and holes, moving discontinuities, biphase flow problems, fluid-structure interaction, etc.