Skip to content

[WIP] Multigrid with 3D implicit line agglomeration - #2863

Open
bigfooted wants to merge 47 commits into
developfrom
feature_fullmg
Open

[WIP] Multigrid with 3D implicit line agglomeration#2863
bigfooted wants to merge 47 commits into
developfrom
feature_fullmg

Conversation

@bigfooted

@bigfooted bigfooted commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Proposed Changes

[EDIT] moving the Full Multi-Grid stuff to a separate PR

fix full multigrid

  • FMG now has scaled CFL for the coarser meshes during the warmup phase. We also have
    MG_STARTUP_ITER= 50 as config option.
  • FMG does an early exit during warmup phase when convergence of 2 orders of magnitude. CONV_FIELD is used as criterion

fix implicit line agglomeration

  • for the turbulent flat plate and single core computations, we get an exact agglomeration.
  • new config options:
    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.

  • 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.

Comment thread SU2_CFD/src/integration/CMultiGridIntegration.cpp Outdated
Comment thread Common/src/geometry/CMultiGridGeometry.cpp Fixed
Comment thread Common/src/geometry/CMultiGridGeometry.cpp Fixed
bigfooted and others added 3 commits August 5, 2026 22:22
… type with wide type in loop condition'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Comment thread SU2_CFD/src/integration/CMultiGridIntegration.cpp Fixed
@bigfooted bigfooted changed the title [WIP] Full multigrid with implicit line agglomeration [WIP] Multigrid with 3D implicit line agglomeration Aug 21, 2026
@bigfooted bigfooted mentioned this pull request Aug 21, 2026
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>
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.

2 participants