The Quadrilateral Domain
The reference domain for a quadrilateral element is the unit square . Every quadrilateral element in a mesh is the image of under a bilinear map , so quadrature rules are again defined once on the reference domain.
Because is a product domain, a 2D quadrature rule can be built directly from the 1D Gauss–Legendre rule on by a tensor-product construction. Given a 1D rule with points and weights , the 2D rule uses all pairs as quadrature points with weights :
If the 1D rule integrates polynomials of degree exactly, the tensor-product rule integrates all polynomials of the form with and exactly. This covers all bivariate polynomials of total degree at most , and more. The weights are all positive and sum to , the area of the reference square.
The figure below shows the order-7 rule, which places a grid of 16 points on the reference square. Marker size is proportional to the weight.
In the library, this construction is implemented in refdomains/quadrilateral.py by QuadrilateralDomain, which delegates to LineDomain internally and forms the tensor product using np.meshgrid. Its quadrature(order) method supports any polynomial order for which LineDomain has a rule.