The Hexahedron Domain
The reference domain for a hexahedral element is the unit cube . Every hexahedral element in a mesh is the image of under a trilinear map .
Just as the quadrilateral rule is a tensor product of two 1D Gauss–Legendre rules, the hexahedron rule is a tensor product of three. The derivation follows exactly the same reasoning, extended to a third coordinate direction. The quadrature points are all triples of 1D nodes, with weights . All weights are positive, sum to , and the rule integrates all monomials with exactly.
The figure below shows the order-5 rule, which places points in a regular grid inside the reference cube.
In the library, this construction is implemented in refdomains/hexahedron.py by HexahedronDomain, which delegates to LineDomain and forms the tensor product using np.meshgrid. Its quadrature(order) method supports any polynomial order for which LineDomain has a rule.