← Back to Tools Index

Inter-Element Compatibility

How shape functions guarantee (or break) matching displacements along a shared edge

Background

Reference: Lecture Notes §3.4 — Interpolation

For a finite element mesh to represent a continuous displacement field, two adjacent elements must produce identical displacements along their shared edge. This requirement is called inter-element compatibility (or C0 continuity).

Whether compatibility holds depends on whether the displacement along a shared edge is fully determined by the nodes on that edge, or whether it also depends on off-edge nodes that differ between the two neighbors.

Element Equations

All three element types are defined on the reference square (ξ, η) ∈ [−1, 1]² for the isoparametric cases, and directly in physical (x, y) for the non-standard case. Local corner numbering is counter-clockwise from the bottom-left (1, 2, 3, 4); Q8 adds mid-edge nodes 5, 6, 7, 8 on the bottom, right, top, and left edges respectively.

Q4 — bilinear

shape fns: Ni(ξ, η) = ¼ (1 + ξi ξ) (1 + ηi η)
displacement: u(ξ, η) = ∑i=14 Ni ui

On the right edge ξ = +1, the trace reduces to a 1D polynomial in η. Only nodes 2 and 3 (the two corners lying on that edge) contribute:

edge trace: u(η)|ξ=+1 = ½(1−η) u2 + ½(1+η) u3

Linear in η, fully determined by the 2 shared nodes. Compatible.

Q8 — quadratic serendipity

corner nodes: Ni = ¼ (1 + ξi ξ) (1 + ηi η) (ξi ξ + ηi η − 1)
ξi = 0 edges: Ni = ½ (1 − ξ²) (1 + ηi η)
ηi = 0 edges: Ni = ½ (1 + ξi ξ) (1 − η²)

On the right edge ξ = +1, only the two corners (nodes 2, 3) and the mid-edge node (node 6 at ξ = 1, η = 0) survive:

edge trace: u(η)|ξ=+1 = −½ η(1−η) u2 + ½ η(1+η) u3 + (1 − η²) u6

Quadratic in η, fully determined by the 3 shared edge nodes. Compatible.

Incompatible 5-node element — global polynomial fit

Instead of natural-coordinate shape functions, the displacement is written as a polynomial in the global coordinates (x, y) using the basis {1, x, y, xy, y²}, and the 5 unknown coefficients are found by collocation at the 4 corners plus 1 interior node:

displacement: u(x, y) = α1 + α2 x + α3 y + α4 xy + α5
fit (5×5): [1, xi, yi, xi yi, yi²] α = ui,   i = 1 … 5

On the shared vertical edge x = 0, the x and xy terms drop out, leaving:

edge trace: u(0, y) = α1 + α3 y + α5

This is a quadratic in y with three free coefficients, but the shared edge only carries two nodes (the corners at y = ±1.5). The two nodal values give only two equations:

u1 = α1 − 1.5 α3 + 2.25 α5
u2 = α1 + 1.5 α3 + 2.25 α5

The third equation that pins α5 comes from the off-edge interior node, which is different for the two neighbors. They therefore fit different parabolas on the same shared edge — incompatible, a gap opens.

Interactive Demo

Two axis-aligned rectangles share the vertical edge x = 0. Drag any red node to prescribe a nodal displacement. Shared-edge nodes are in yellow; off-edge interior nodes (Incompatible mode only) are in purple.

Drag the nodes — undeformed rectangles are axis-aligned

Displacement along shared edge

Left: dashed gray = undeformed rectangles; solid blue = left element's deformed edges; solid red = right element's. Yellow markers sit on the shared edge; purple markers are off-edge interior nodes. Right: u(y) and v(y) along the shared edge, evaluated independently from each element. When the left and right traces overlap, the edge is compatible. When they separate, the mesh has a gap.

Try it.

Key Takeaway

An element is inter-element compatible if and only if the displacement trace along every edge depends only on the nodes lying on that edge. Standard isoparametric elements (Q4, Q8, Q9, …) satisfy this automatically because their shape functions, restricted to an edge, reduce to 1D polynomials in the edge nodes alone. Non-standard element formulations — such as globally fitted polynomials that include terms like or without enough edge nodes to constrain them — break this property and open gaps between neighbors, even on axis-aligned rectangles.