The Chartership Forum

Linear Finite Element Analysis / Solvers and conditioning

Solver comparisons and tolerance choices

Derive preconditioned conjugate-gradient updates for an SPD system. Check true residual and known-solution error without confusing algebraic and modelling accuracy.

Lesson review: expert verification remains open

This lesson has received a full-context editorial review and a check of its technical explanations. Selected arithmetic has been checked separately. This is not independent engineering sign-off.

Checks needed for project use

  • Independent numerical-analysis reviewer: sparse solvers, scaling, conditioning and production preconditioners. The implementation is a small SPD teaching chain.
  • Actual browser zoom, screen-reader/additional-browser use and native-fullscreen visual rendering remain unqualified; see report.

These are educational models and exercises. Check their assumptions before using the results. The full technical content and every diagram have not yet been independently verified.

Concrete and steel calculations retain their stated first-generation Eurocode teaching basis. Use the standards and amendments specified for your project; do not mix generations without an appropriate design basis.

Read the lesson register and outstanding review notes

What you should already know

Worked example

A small residual can conceal a larger movement error

Given

  • A = diag(1, 10⁻⁶), exact x* = (1,1)
  • b = (1,10⁻⁶); proposed x = (1,1.01)

Find

Residual, relative displacement error and condition-number bound.

    A restrained spring chain with 16 free translations and stiffness contrast 100. Loads are manufactured from a known sine displacement. CG starts from zero; the stopping check recomputes the true residual.

    True relative residual by iteration

    Horizontal: iteration. Vertical: log10 relative residual.

    -140-104-6.58-2.812116
    • True residual; display floor 10⁻¹⁴
    Status
    Tolerance reached
    Iterations
    16
    Stored matrix entries
    46 / 256 dense
    True relative residual
    3.882e-15
    Normwise backward error (∞)
    7.814e-17
    Known-solution relative error (2)
    6.691e-16

    Target 10⁻¹⁰; maximum 64 iterations. Residual need not fall at every iteration. The curve floor affects drawing only. This small benchmark is not an industrial solver performance test.

    Choose tolerances in context

    A relative residual needs a non-zero reference load. The zero-load test returns the zero solution directly. With mixed translation and rotation equations, force and moment rows have different units; a raw vector norm changes under unit conversion. Meaningful scaling should reflect work-conjugate movement and force scales, and its effect must be documented.

    A converged algebraic solution still contains discretisation, constitutive, boundary-condition and load-idealisation errors. Tightening the solver tolerance cannot correct the wrong support. For a quantity of interest, compare its change under tighter algebraic tolerance with its change under mesh refinement. Record both. Severe conditioning may also reduce the digits that can be trusted in a direct solve.

    The supplied implementation uses small matrices, ordinary floating-point arithmetic and no multigrid or incomplete factorisation. It is intended to expose storage and stopping decisions. Choosing and qualifying a production preconditioner remains separate work.

    Sources and specialist review

    Netlib’s Templates was inspected for CG, preconditioning and stopping-criterion context. The CSR chain, small-system derivation and conditioning example are original. Production-scale solvers, mixed-unit scaling and preconditioner selection require specialist review. The derivations, examples and teaching routines are original. Bounded numerical checks are recorded; independent specialist review of the formulation, applicability and educational treatment remains open. Download the analysis routines, together with their member and bar dependencies.