Repository navigation
MPI Point-to-Point Refactoring + New Periodic BC Implementation - #652
Conversation
…be generalized to all solvers and parallelization should be improved.
…sors, and eigenvalues. Both Euler and N-S operational. Fixed multiple bugs.
|
Thanks for the input, everyone. Time to finally merge this one. @pcarruscag : let's finish up #653 as a next step and get that merged asap. I can help fix up any conflicts in the matrix classes. |
TobiKattmann
left a comment
There was a problem hiding this comment.
A bit late to the party, I guess...
I thought i better submit that now instead of not submitting at all.
Most of it is quite pedantic.
| Sens_Remove_Sharp, /*!< \brief Flag for removing or not the sharp edges from the sensitivity computation. */ | ||
| Hold_GridFixed, /*!< \brief Flag hold fixed some part of the mesh during the deformation. */ | ||
| Axisymmetric, /*!< \brief Flag for axisymmetric calculations */ | ||
| TaylorGreen, |
| */ | ||
| bool GetAxisymmetric(void); | ||
|
|
||
| bool GetTaylorGreen(void); |
There was a problem hiding this comment.
Description missing + indentation
| Boundary, /*!< \brief To see if a point belong to the boundary (including MPI). */ | ||
| PhysicalBoundary, /*!< \brief To see if a point belong to the physical boundary (without includin MPI). */ | ||
| SolidBoundary; /*!< \brief To see if a point belong to the physical boundary (without includin MPI). */ | ||
| SolidBoundary, /*!< \brief To see if a point belong to the physical boundary (without includin MPI). */ |
There was a problem hiding this comment.
Copied description.
including instead includin.
Difference between solid and physical not clear to me.
| */ | ||
| virtual ~CGeometry(void); | ||
|
|
||
| /*! |
There was a problem hiding this comment.
2x brief, not sure if that has a meaning within doxygen?
|
|
||
| /*! | ||
| * \brief A virtual member. | ||
| * \param[in] config - Definition of the particular problem. |
There was a problem hiding this comment.
Missing input val_periodic. Can be copied from the non-virtual MatchPeriodic from l. 2119
| * \param[in] config - Definition of the particular problem. | ||
| * \param[in] val_periodic - Index of the first periodic face in a pair. | ||
| */ | ||
| void MatchPeriodic(CConfig *config, unsigned short val_periodic); |
There was a problem hiding this comment.
Input parameters as a list
| * \param[in] monitoring - turn on priting residuals from solver to screen. | ||
| * \param[in] config - Definition of the particular problem. | ||
| */ | ||
| unsigned long CG_LinSolver(const CSysVector & b, CSysVector & x, CMatrixVectorProduct & mat_vec, |
There was a problem hiding this comment.
Input parameters as a list
| * \param[in] monitoring - turn on priting residuals from solver to screen. | ||
| * \param[in] config - Definition of the particular problem. | ||
| */ | ||
| unsigned long FGMRES_LinSolver(const CSysVector & b, CSysVector & x, CMatrixVectorProduct & mat_vec, |
There was a problem hiding this comment.
Input parameters as a list
| * \param[in] monitoring - turn on priting residuals from solver to screen. | ||
| * \param[in] config - Definition of the particular problem. | ||
| */ | ||
| unsigned long BCGSTAB_LinSolver(const CSysVector & b, CSysVector & x, CMatrixVectorProduct & mat_vec, |
There was a problem hiding this comment.
Input parameters as a list
| #include "../include/toolboxes/printing_toolbox.hpp" | ||
|
|
||
| CConfig::CConfig(char case_filename[MAX_STRING_SIZE], unsigned short val_software, unsigned short val_iZone, unsigned short val_nZone, unsigned short val_nDim, unsigned short verb_level) { | ||
| CConfig::CConfig(char case_filename[MAX_STRING_SIZE], unsigned short val_software, unsigned short val_iZone, unsigned short val_nZone, unsigned short val_nDim, bool verb_high) { |
There was a problem hiding this comment.
Input parameters as a list
…and limiters (#2961) ## Proposed Changes This is one of **seven related periodic-boundary bug-fix PRs**. | PR | Scope | |---|---| | #2961 (this PR) | Rotational Jacobian, multigrid velocity rotation and limiters | | #2963 | Axis points, slip-wall normals and moving donor volumes | | #2964 | Periodic volumes, neighbor counts, sensors, stencils and coarse flags | | #2965 | Streamwise periodicity, auxiliary gradients and flamelet metadata | | #2966 | Inverse affine transforms in the parser and FEM | | #2968 | Diagnostics for unsupported periodic solver combinations | | #2969 | Translated wall-distance images | The other bug-fix PRs are drafts with their remaining validation and implementation limits documented. Their grouping does not imply a linear merge order; #2963 depends on this PR. The fully coupled implicit operator proposed in #2967 is a separate experimental enhancement. It has been closed and deferred because no overall benefit has been established and convergence/validation issues remain. This PR retains the existing implicit approximation. Three fixes for rotational periodic boundaries, one commit each. The test cases are in the comment below. - **Implicit runs:** the Jacobian block that a periodic point gets from its match was rotated on one side only. It is now rotated on both sides. - **Multigrid:** the coarse levels did not rotate the velocity, so the run did not converge. The velocity is now rotated on all levels. - **Limiters:** the limiters of the velocity components were rotated like a vector, but they are separate numbers. On the periodic boundary one velocity component became first order, and limiters could be negative. Each side now sends the velocity bounds and reconstruction increments in the frame of the other side, so each limiter uses the complete stencil. Nothing changes for a translation. New tests `periodic2d_no_limiter` and `periodic2d_multigrid`; `periodic2d` is now also in the MPI regression. Their x86 reference values pass in CI. Existing reference values that change: `aachen_turbine_restart`, `jones_turbocharger_restart` and `multi_interface` (rotational periodic, the Jacobian block), and the hybrid `periodic2d` (the Jacobian block and the limiters). The x86 periodic tests and the other changed cases pass in CI; the Jones restart residual references were refreshed from the serial, MPI and hybrid CI logs. The aarch64 references still need the CI runs. No conflict with #2945 and #2959. #2956 also changes the reference values of `jones_turbocharger_restart`; whichever is merged second takes them from the CI. ## Related Work - #652 added the present implementation of the periodic boundaries. - #1563 fixed the rotation in 2D and added the `periodic2D` case used here. - #1467, #763 and #1585 discuss the incomplete linear system at periodic points; this PR keeps the existing approximation. ## PR Checklist - [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: rois1995 <rauxa1995@hotmail.it> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Josh Kelly <81244680+joshkellyjak@users.noreply.github.com> Co-authored-by: Nijso <bigfootedrockmidget@hotmail.com>
Proposed Changes
Give a brief overview of your contribution here in a few sentences.
This is one for v7 and needs some testing. This PR contains a complete refactoring of the point-to-point MPI infrastructure and an entirely new implementation of the periodic BC for the FV solvers.
For the MPI refactoring:
For the periodic BC:
In a follow-up PR, I will remove many lines of code that are no longer needed (all Set_MPI_* routines, many outdated geometry routines, etc.)
Related Work
Resolve any issues (bug fix or feature request), note any related PRs, or mention interactions with the work of others, if any.
I could use some help with testing this one, in particular the rotational periodicity, which might still need some changes. Unfortunately, I do not have the original meshes for the periodic cases in the repo that are failing (other than Poiseuille)..@salvovitale @LaSerpe @arubino: do you have the original grids for the periodic cases before adding the halos with SU2_MSH? I would like to make sure that everything is working ok for all previous capability.All periodic meshes in the regressions have been updated for the new periodic BC, and a python script has been added to remove halo cells from old meshes that were preprocessed with SU2_MSH for the previous periodic BC implementation.
Resolves #550
Resolves #431
Resolves #416
Resolves #252
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.