Linear-system solvers: direct vs iterative
What you are seeing: the discrete 1D Poisson problem on grid points. The same right-hand side is fed to a Thomas direct solver (exact, ), Jacobi, Gauss-Seidel, and conjugate gradient. The lower panel tracks the residual norm vs iteration count; CG converges in at most steps in exact arithmetic.
N (grid)32
solver
‖r‖:0
0WHAT TO TRY
- Vary each control and watch the rail readouts respond.
- Compare the diagnostic plot against the live scene.