mdolab / adflow

ADflow is a finite volume RANS solver tailored for gradient-based aerodynamic design optimization.
Other
229 stars 99 forks source link

Algebraic multigrid preconditioner changes #305

Closed sseraj closed 1 year ago

sseraj commented 1 year ago

Purpose

I made some changes to algebraic multigrid preconditioner to make it more useable: 1) Renamed AGMG to AMG to avoid confusion with agglomerated multigrid methods like in #49 2) Added separate AMG options for the ANK, NK, and adjoint solvers. I made this change because I had cases where AMG was effective for the adjoint but not ANK. This is a breaking change because option names and behavior are different. 3) Fixed a bug where AMG would crash when using 1 outer iteration 4) Added the ability to use multiple ILU iterations in the AMG smoother. This maintains consistency with the ASM+ILU combination we use when not using AMG.

This PR could close #49 depending on how much more documentation and testing we want.

Expected time until merged

3 weeks

Type of change

Testing

I added tests for different combinations of AMG levels and iterations, including a test for the bugfix when using 1 outer iteration.

Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #305 (eb9b39d) into main (820f182) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #305   +/-   ##
=======================================
  Coverage   41.98%   41.98%           
=======================================
  Files          13       13           
  Lines        4001     4001           
=======================================
  Hits         1680     1680           
  Misses       2321     2321           
Files Changed Coverage Δ
adflow/pyADflow.py 68.94% <ø> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more