Hexahedral elements cut by a discontinuity plane

Quadrature of discontinuous enrichments in XFEM / GFEM

One of the most interesting properties of the extended/generalized finite element method is its ability of representing discontinuities independently of the mesh. This is accomplished by enriching the approximation space by discontinuous functions. The most common case is given by a jump in the primal approximation variable on a given surface. For example, in mechanics this may be the case of a displacement jump on a crack surface.
In this case the most common discontinuous enrichment function is the generalised Heaviside function H, assuming the value +1 or -1 on the two sides of the discontinuity.

However, as the representation space is enriched with the Heaviside function, the evaluation of the finite element matrices cannot be performed by traditional Gaussian quadrature, being the integrands piecewise continuous and differentiable in the two subdomains individuated by the discontinuity plane. 

The classical strategy is to perform two separate quadratures on the two subdomains. The shortcoming with this approach is that the two subdomains may have quite complex shapes, so that a lot of coding is required to account for all the possible cases.

Equivalent Polynomials

Equivalent polynomials are an elegant way to eliminate the above issue. The Heaviside function is mapped onto an equivalent polynomial. Equivalence is meant in this context is the sense that, if the Heaviside function is replaced by the equivalent polynomial in the element matrix determination, the same result as the quadrature on the two separate subdomains is obtained.

The advantage is that, employing equivalent polynomials, standard Gaussian quadrature on the entire element domain can be applied. 

This implies an enormous simplification in the development of computational codes. 
Generalized Heaviside step function
Generalized Heaviside function

Heaviside step function vs. equivalent polynomials up to degree 5
Equivalent polynomials up to degree 5 for a discontinuity at 0.5 in the domain [0, 1]

Equivalent polynomials of degree 0...5 for a discontinuity at 0.2
Equivalent polynomials up to degree 5 for a discontinuity at 0.2 in the domain [0, 1]