[WIP] Multigrid with 3D implicit line agglomeration - #2863
Open
bigfooted wants to merge 47 commits into
Open
Conversation
remove multigrid turbulence Co-authored-by: Nijso <nijso@hotmail.com>
Co-authored-by: Nijso <nijso@hotmail.com>
Co-authored-by: Nijso <nijso@hotmail.com>
Co-authored-by: Nijso <nijso@hotmail.com>
bigfooted
commented
Aug 5, 2026
… type with wide type in loop condition' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…feature_fullmg
…feature_fullmg
6 tasks
bigfooted
added a commit
that referenced
this pull request
Aug 26, 2026
## Proposed Changes This is a split from #2863 to clean up the different implementations. This PR does not really improve convergence, it merely implements some configuration options and makes it work robustly. An improvement comes from the CFL ramping: every level of the startup phase in FMG gets its own scaled CFL, then for this level CFL increases from the max CFL of the previous level to the new CFL of this level over MG_STARTUP_ITER iterations. This does mean some CFL jumps when you converge early. Also, when you exit the startup phase and enter the final v-cycle phase, you immediately jump to CFL_NUMBER, no ramping here. The real future improvement is probably stepping away from the piecewise constant interpolation. At the moment there is no improvement because the coarser levels do not result in a better starting point for the final v-cycle. Implementation details: MG_STARTUP_ITER= 100 %Full multigrid iterations per level for the warmup phase. MG_CFL_SCALING= 0.5, 0.5, 0.5 %Full multigrid now has CFL scaling for the coarser levels during warmup phase MG_STARTUP_CONVERGENCE= -2 %Full multigrid now exits the current level during the warmup phase when convergence dropped. MG_STARTUP_STAGNATION_ITER= 0.99 %Full multigrid now exits the current level during the warmup phase when the level residual stalls. MG_STARTUP_STAGNATION_ITER= 5 % 5 consecutive iteration of stagnation before exiting. ## Related Work #2863 ## PR Checklist *Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.* - [x] I am submitting my contribution to the develop branch. - [x] My contribution generates no new compiler warnings (try with --warnlevel=3 when using meson). - [x] My contribution is commented and consistent with SU2 style (https://su2code.github.io/docs_v7/Style-Guide/). - [x] I used the pre-commit hook to prevent dirty commits and used `pre-commit run --all` to format old commits. - [x] 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. --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
[EDIT] moving the Full Multi-Grid stuff to a separate PR
fix full multigrid
MG_STARTUP_ITER= 50 as config option.
fix implicit line agglomeration
MG_IMPLICIT_LINES= YES
MG_IMPLICIT_LINES_MAX_LENGTH= 1000
MG_IMPLICIT_LINES_ISOTROPIC= YES
For isotropic=yes, every pair of 2x2 nodes is agglomerated, for isotropic=no, we only agglomerate in the direction normal to the implicit line, so the y+ values are preserved.
The implicit line agglomeration works for 2D and 3D, but has been tested more intensively on 2D cases.
Related Work
PR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.
pre-commit run --allto format old commits.