Model and degrees of freedom
Each node has one axial DOF. Numbering determines coefficient addresses in the global matrix.
Structural model
Click an element to explore its matrix
Element e₁
k₁ = E₁A₁/L₁ = 10 kN/mm
Local DOFs [1, 2]
global [u₁, u₂]
k(e) =
kN/mm
k(e) = (EA/L) · [[1, −1], [−1, 1]]
Global stiffness matrix K
K = 0Triplets before summing repeated addresses
After sparse() · educational row-wise view
values[]
columns[]
rowPtr[1, 1, 1, 1, 1]
Storage in this example
Dense: 16 numbers · sparse: nonzero values and index metadata
K is currently zero. The element map determines which four cells receive its contribution.
nonzero coefficient
current contribution
removed DOF
Elements assembled
0 / 3
System size to solve
4 × 4
State
K not assembled
The full matrix remains unchanged until constraints are applied.