The Global Stiffness Matrix [K]

Every meshfree structural solve, regardless of the weak-form formulation (EFG Galerkin or MLPG5) or the discretisation strategy, reduces to a linear algebraic system:

K u = f

where K ∈ ℝ2N×2N is the global stiffness matrix, u the vector of nodal displacement parameters, and f the external force vector (for a 2D problem with N nodes and 2 DOF/node). This page explains the theoretical properties of K: how it differs before and after boundary conditions are applied, what symmetry (or lack thereof) means physically for EFG vs. MLPG5, and how to interpret the diagnostic statistics computed from it.

1. Two matrices: pre-BC and post-BC

It is essential to distinguish between two different matrices that both go by the name "K" in a finite-element or meshfree code:

MatrixDefinitionProperties
K0 (pre-BC / assembled) Result of the weak-form domain integration alone, before any essential boundary condition is imposed. Singular (rank-deficient): rigid-body modes (translations, rotation) lie in its null space, since no displacement has been constrained yet.
K (post-BC / solved) K0 after essential boundary conditions (prescribed displacements) have been enforced by penalty or direct substitution. Non-singular (invertible) provided enough rigid-body modes are removed; this is the matrix actually factorised/solved to obtain u.
A structural problem with no essential BC (a "free-floating" body) always has a singular K0 — this is not a discretisation error, it reflects the physical fact that rigid-body motion does not store strain energy. Essential BCs remove exactly the rigid-body degrees of freedom that would otherwise make the system unsolvable.

2. How essential boundary conditions modify K

GearMaster implements two classical enforcement strategies for prescribed-displacement (fixed joint) constraints, each with different mathematical consequences for the post-BC matrix.

2.1 Penalty method

The constrained equation ui = &ū;i is enforced approximately by adding a large stiffness α to the diagonal term of the constrained DOF:

Kii ← Kii + α,     α = β × maxk(Kkk),   β ≈ 107

Because only diagonal entries are touched, the off-diagonal structure — and in particular the symmetry of the matrix — is entirely unaffected. If K0 was symmetric, the resulting K is symmetric too. The accuracy of the constraint is approximate, of order O(1/β), which is negligible for structural engineering purposes but does inflate the matrix condition number by roughly a factor of β.

2.2 Direct substitution (elimination)

The constrained equation is instead replaced outright by the trivial identity ui = &ū;i:

Kij ← δij  (row i zeroed, diagonal set to 1),     fi ← &ū;i

Textbook direct substitution also zeroes the matching column j = i (moving its contribution to the right-hand side) in order to keep the matrix symmetric. GearMaster's current implementation only zeroes the row, not the column, which is mathematically valid for the special case &ū;i = 0 (all constraints in GearMaster are currently zero-displacement) — the solution u is identical either way, since the omitted column correction would have been Kji × 0 = 0. However, the matrix itself is left non-symmetric as a side effect, even when it started perfectly symmetric.

Practical consequence: the "Symmetric" property reported for the post-BC matrix depends on which enforcement method was used, not only on the weak-form formulation (EFG vs. MLPG5). A symmetric EFG assembly can legitimately report Symmetric = False after "direct" BC enforcement — this does not indicate an assembly bug.

3. Expected symmetry: theory vs. formulation

FormulationPre-BC symmetry (theory)Why
EFG (Element-Free Galerkin) Symmetric, positive semi-definite EFG uses a global Galerkin weak form: the same trial and test function spaces are used (Bubnov-Galerkin), so Kij = ∫Ω BiT D Bj dV = Kji by construction — identical to the classical FEM stiffness matrix property (Zienkiewicz & Taylor, The Finite Element Method, 2000).
MLPG5 (Meshless Local Petrov-Galerkin) Non-symmetric in general MLPG uses a local weak form with test functions (Heaviside step over each node's local subdomain) that differ from the MLS trial (shape) functions — a true Petrov-Galerkin scheme. Different trial and test spaces mean there is no algebraic reason for Kij = Kji (Atluri & Zhu, "A new Meshless Local Petrov-Galerkin (MLPG) approach in computational mechanics", Computational Mechanics, 1998; Atluri & Shen, The Meshless Local Petrov-Galerkin (MLPG) Method, 2002).

This is a deliberate trade-off of the MLPG family: avoiding the background integration cells required by the global Galerkin form (EFG) in exchange for a generally non-symmetric, sometimes less well-conditioned system that still converges to the correct physical solution under appropriate quadrature and support-domain settings.

4. Physical meaning of the diagnostic statistics

4.1 Size and non-zero count

Size is 2N × 2N for a 2D problem with N nodes (2 DOF per node: ux, uy). Non-zeros (nnz) counts how many of the (2N)² entries are actually populated. In a meshfree method, an entry Kij is non-zero only if the supports of nodes i and j overlap — i.e. they are "compact-support neighbours". Far-apart nodes never interact directly, which is exactly why the matrix is sparse rather than dense.

4.2 Sparsity

sparsity = 1 − nnz / (2N)²

A higher sparsity means each node's support domain touches fewer neighbours relative to the total problem size. Physically, sparsity is controlled by the ratio between the support-domain radius (the α dilation parameter) and the average nodal spacing: a larger support radius increases the number of overlapping neighbours per node, increasing nnz and decreasing sparsity (denser matrix, more coupling, generally smoother but costlier solves).

Example: for the same point cloud, MLPG5 with the Voronoi subdomain typically shows higher sparsity than EFG with Delaunay background cells, because MLPG5's local weak form couples node i only with the neighbours entering its own Voronoi-cell boundary integral, while EFG's global domain integration (via background triangles) tends to couple slightly larger neighbourhoods through the shared quadrature points.

4.3 Memory

For sparse storage (CSR), memory scales with nnz, not with (2N)² — this is the entire point of using a sparse solver for meshfree/FEM problems, where nnz \ll (2N)² for reasonably local support domains. Dense storage always costs O((2N)²) regardless of the actual coupling, which becomes prohibitive quickly (a 10 000-DOF dense matrix already needs 800 MB in double precision).

4.4 Symmetric

See §2 and §3 above: this reflects the solved (post-BC) matrix, and is affected both by the weak-form formulation (EFG vs. MLPG5) and by the essential-BC enforcement method (penalty preserves symmetry; direct substitution as implemented does not).

4.5 Condition number

κ(K) = σmax(K) / σmin(K)

The condition number measures how much an error in f (or in the matrix entries themselves, e.g. round-off) is amplified in the computed u. A rule of thumb: roughly log10(κ) digits of accuracy are lost relative to machine precision (Golub & Van Loan, Matrix Computations, 4th ed., 2013).

κ(K) rangeTypical interpretation
10¹–10&sup4;Well-conditioned; double-precision solve is essentially exact.
10&sup5;–10&sup8;Moderately ill-conditioned; still safe in double precision (∼16 digits available), but sensitive to near-degenerate node clusters or very small/large support radii.
>10¹²Severely ill-conditioned; solution may be dominated by round-off. Often caused by the penalty method's large α (§2.1), by nearly coincident nodes, or by a support radius too close to the minimum required for MLS invertibility.
Example: a condition number of κ ≈ 10&sup8; with the penalty method and β = 107 is expected and benign — it is largely an artefact of the penalty scaling itself (§2.1), not a sign of a poorly posed physical problem. The same model solved with "direct" substitution would typically show a much smaller condition number, since no artificially large diagonal term is introduced.
MLPG5 matrices are, in general, expected to have a higher condition number than EFG for a comparable point cloud, because the Petrov-Galerkin asymmetry (§3) combines with the local integration to make the system less diagonally dominant than the symmetric, globally-integrated EFG matrix.

5. References