The Quad4 Element
The Quad4 element is the simplest quadrilateral element: 4 nodes, one at each corner of the reference square, with bilinear shape functions. The reference domain is with corners
matching the quadrilateral reference domain.
In the library, it is implemented in elements/quad4.py
by the class Quad4.
The shape functions are obtained as tensor products of the two Line2 shape functions. Writing and for the linear Lagrange basis on , each Quad4 shape function takes the form for appropriate choices of :
Each equals one at its own corner and zero at the other three, and the four functions form a partition of unity. The figure below shows all four shape functions as filled contour plots over the reference square.
Unlike the triangular elements, the Quad4 shape functions are not linear polynomials — they are bilinear, meaning linear in each variable separately but containing the cross term . As a result, the reference-domain gradients are not constant but depend on position:
Quad4 can represent any function of the form exactly. In particular it reproduces all linear functions, so the element achieves first-order accuracy. For the isoparametric mapping, the same four shape functions carry the reference square to any physical quadrilateral with vertices via . When the physical element is not a parallelogram the mapping is genuinely nonlinear, which is why the Jacobian must be evaluated numerically at each quadrature point rather than once per element.