Conversation
Co-authored-by: Johannes Blühdorn <55186095+jblueh@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
Co-authored-by: Pedro Gomes <38071223+pcarruscag@users.noreply.github.com>
| // nijso: check if this can be removed now. | ||
| //solver_fine->InitiateComms(geometry_fine, config, MPI_QUANTITIES::SOLUTION); | ||
| //solver_fine->CompleteComms(geometry_fine, config, MPI_QUANTITIES::SOLUTION); |
Check notice
Code scanning / CodeQL
Commented-out code Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 1 day ago
In general, to fix “commented-out code” issues you either (a) re-enable the code if it is still needed, or (b) delete it entirely if it is obsolete or merely serving as a reminder. If a conceptual description is useful for future readers, that should be expressed as a natural-language comment rather than as disabled code.
For this specific case in SU2_CFD/src/integration/CMultiGridIntegration.cpp, the two lines:
//solver_fine->InitiateComms(geometry_fine, config, MPI_QUANTITIES::SOLUTION);
//solver_fine->CompleteComms(geometry_fine, config, MPI_QUANTITIES::SOLUTION);are clearly commented-out function calls. The best fix that does not change existing functionality is to remove these two lines entirely while leaving the surrounding smoothing logic unchanged. The preceding comment “/--- MPI sync after RK stage to ensure halos have updated solution for next smoothing iteration ---/” already explains the intended behavior; the extra line // nijso: check if this can be removed now. is more of a personal note. We can keep or slightly rephrase it as a neutral TODO-style comment without any code; to minimize behavioral changes, we will simply keep it. No new methods, imports, or definitions are required.
Concretely:
- Edit
SU2_CFD/src/integration/CMultiGridIntegration.cpp. - In the loop where post-smoothing is performed (around line 562), delete the two commented-out lines containing
solver_fine->InitiateCommsandsolver_fine->CompleteComms. - Leave all other code and comments intact.
| @@ -561,8 +561,6 @@ | ||
|
|
||
| /*--- MPI sync after RK stage to ensure halos have updated solution for next smoothing iteration ---*/ | ||
| // nijso: check if this can be removed now. | ||
| //solver_fine->InitiateComms(geometry_fine, config, MPI_QUANTITIES::SOLUTION); | ||
| //solver_fine->CompleteComms(geometry_fine, config, MPI_QUANTITIES::SOLUTION); | ||
|
|
||
| } | ||
| } |
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Proposed Changes
Give a brief overview of your contribution here in a few sentences.
Implement multigrid agglomeration according to Nishikawa and Diskin.
euler walls are working correctly.
mpi seems to be working (can be improved)
OMP seems to be working (can be improved)
multigrid does not crash anymore
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 --allto 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.