Affine-cache cross-check

A numeric-only consistency check, no figure. The 2-D diffusion eigenproblem exploits an affine structure in its coefficient to assemble the stiffness matrix cheaply: four fixed component matrices are precomputed once and recombined at each parameter value. This page verifies that the fast recombined assembly reproduces a direct finite-element assembly to floating-point round-off, so that the speed-up costs nothing in accuracy.

Why this matters

Because the weak form is affine in the entries of the coefficient matrix c(\mu), the stiffness matrix decomposes into four fixed component matrices K_{ij} (one per entry of c), assembled once and recombined per parameter value:

K(\mu) \;=\; \sum_{ij} c_{ij}(\mu)\,K_{ij}.

The 2-D diffusion benchmark and the ROM-vs-dense study both rely on this recombined path for both the surrogate and the dense reference. A bug in the recombination — or in the indexing of the four components — would therefore be invisible to the ROM-vs-dense equivalence check, since both sides would inherit the same error. This cross-check re-assembles K(\mu) from a single bilinear form with the full coefficient baked in directly, a path that does not touch the component cache at all, and confirms the two agree to floating-point round-off.

The check

At each of \mu \in \{0.4,\, 0.7,\, 1.0\}, the recombined assembly and the direct assembly are compared in the entrywise max norm:

\big\| K_{\text{cached}}(\mu) \,-\, K_{\text{uncached}}(\mu) \big\|_\infty \;\le\; 10^{-14}.

Result

\mu \max\,\lvert K_{\text{cached}} - K_{\text{uncached}}\rvert
0.4 \le 10^{-14} (round-off)
0.7 \le 10^{-14}
1.0 \le 10^{-14}

The two assembly paths agree to round-off at every tested parameter value. Any future drift between the affine decomposition and the canonical bilinear form would break this equality and surface immediately.