Skip to content

Conversation

@pcarruscag
Copy link
Member

Proposed Changes

https://hal.science/hal-00650239v2/document
Deflation is the state-of-the-art way of reducing the size of the Krylov subspace needed by linear solvers.
The TLDR is that deflation approaches reserve a certain number of basis vectors to compute and refine on each restart cycle. When applied to RFGMRES this "memory" keeps the solver from stalling (the linear residual plateaus).

In addition to deflation, this particular method claims to be suitable for subspace recycling, that is, using information from a previous linear solve to accelerate the convergence for a new matrix, RHS, or both. This sounded interesting to explore for problems with expensive linear solves, such as nonlinear elasticity, and CFD with Newton-Krylov.

I'm not using it for NK yet. A bit more testing is needed. For the testcase I modified, the speedup compared with plain RFGMRES is ~3x (from 170 to 64 linear iterations). So the deflation part is working as it should.

PR Checklist

  • I am submitting my contribution to the develop branch.
  • My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson).
  • My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/).
  • I used the pre-commit hook to prevent dirty commits and used pre-commit run --all to format old commits.
  • I have added a test case that demonstrates my contribution, if necessary.
  • I have updated appropriate documentation (Tutorials, Docs Page, config_template.cpp), if necessary.

@bigfooted
Copy link
Contributor

When should we not use it? Or can this be used as an alternative for any linear solver?

@pcarruscag
Copy link
Member Author

It can replace any solver, for a single system its performance should be better than restarted GMRES but worse than full GMRES (although full GMRES will use a lot more memory).
What I guess we'll find out is whether the recycling helps with the many linear systems we solve for the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants