White box / Algorithms and implementation / Matrix and spectral solvers

Sparse direct factorization

Algorithm / execution · assumptions, essential equations, full derivation, algorithm, code and verification references.

Browse another sheet Algorithms and implementation / Matrix and spectral solvers
Algorithms and implementationMatrix and spectral solversSheet 1 / 3
Algorithm / executionSTANDARD SCIPY ROUTE · factor reuse is route-specific

Sparse direct factorization is suited to declared structural matrices and can be reused when the effective matrix is unchanged.

01 Model and scope

A direct solver factors the assembled matrix and reuses that factorization only while the operator is unchanged. Residual and memory checks distinguish a successful factorization from an accurate, affordable solution.

Route assumptions and calculation checks

  1. Audit output distinguishes requested, selected, and executed method.
  2. An enforced memory budget can refuse a direct factorization above its estimated cost.
  3. Factor reuse is recorded and does not apply across changed stiffness, damping, or time step.

02 Essential equations and symbols

Ax=bA x = br=b−Axr = b - A xrelativeresidual=∣∣r∣∣/max(∣∣b∣∣,scalefloor)relative residual = ||r|| / max(||b||, scale floor)

Definitions and conventions

Ax=bA x = b
Linear system.
r=b−Axr = b - Ax
Algebraic residual.
||r||/scale
Reported relative residual with a scale floor.
factor reuse
Reuse valid only for an identical effective matrix.
Sparse direct factorization · method mapThe declared sparse matrix is reordered and factored, then the original-system residual and memory policy are checked.
4 detailed steps

03 Step by step derivation

Follow the assumptions, equations and discrete operations in order. The full explanation stays visible.

1 · Form the linear system that is actually solved

After supports, multipoint constraints, and effective dynamic terms are applied, the direct route receives a specific sparse matrix A and right-hand side b. Its solver eligibility and factorization budget apply to that effective operator, not just the unmodified structural stiffness.

Ax=b\mathbf A\mathbf x=\mathbf b

2 · Factor once and solve by triangular substitutions

Sparse direct methods reorder and factor the matrix to reduce fill, then solve the resulting triangular systems. A later right-hand side can reuse the factor only if the effective matrix and its ordering remain unchanged.

PAQ=LU\mathbf P\mathbf A\mathbf Q=\mathbf L\mathbf ULy=Pb,Uz=y,x=Qz\mathbf L\mathbf y=\mathbf P\mathbf b,\qquad \mathbf U\mathbf z=\mathbf y,\qquad\mathbf x=\mathbf Q\mathbf z

3 · Audit residual, memory, and executed backend

Compute the residual in the original system and report its scale, factor memory estimate, selected backend, actual backend, reuse decision, and termination status. A memory guard may reject a solve before factorization; that is an explicit policy result.

r=b−Ax,rrel=∥r∥2max⁡(∥b∥2,s0)\mathbf r=\mathbf b-\mathbf A\mathbf x,\qquad r_{rel}=\frac{\|\mathbf r\|_2}{\max(\|\mathbf b\|_2,s_0)}

4 · Do not generalize factor reuse

Changing stiffness, damping, boundary conditions, load-dependent tangent, or time step changes A and invalidates reuse. A low residual is an algebraic check only; it does not validate model quality or make an over-budget direct solve affordable.

04 Algorithm and implementation

Read the linked versioned source for the actual assembly and solver behavior. The derivation above explains the mathematics and is not a verbatim source excerpt.

05 Verification and limitations

STANDARD SCIPY ROUTE · factor reuse is route-specific

The formulation and its explanatory checks do not by themselves establish a qualified application domain. Consult the capability matrix and the applicable recorded case.

06 Sources and related sheets

Continue the reasoning

Back to sheet contents ↑