Concept Flow - Sparse iterative solvers (gmres, cg)
Start with sparse matrix A and vector b
Choose solver: GMRES or CG
Initialize guess x0 (usually zeros)
Iterative loop: compute residual r = b - A*x
Check residual norm < tolerance?
Yes→Stop, solution x found
No
Update solution x using solver step
Repeat iterative loop
The solver starts with a guess and improves it step-by-step until the solution fits the equation well enough.