Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
9a2d329
fix order
bigfooted Jul 29, 2026
06790fb
minor implicit line changes
bigfooted Jul 30, 2026
4cc6571
Merge branch 'develop' into fix_mg_implicit_lines
bigfooted Jul 31, 2026
3b9e9df
fix multigrid turbulence
bigfooted Aug 1, 2026
7e1f670
small flow solver update
bigfooted Aug 2, 2026
33f2eaf
small flow solver update
bigfooted Aug 2, 2026
3e0d528
Apply suggestions from code review
bigfooted Aug 4, 2026
feccac0
Merge branch 'develop' into feature_fullmg
bigfooted Aug 4, 2026
4922e7b
Apply suggestions from code review
bigfooted Aug 4, 2026
5d80679
precommit
bigfooted Aug 4, 2026
7a0db10
Apply suggestions from code review
bigfooted Aug 4, 2026
aca34af
Apply suggestions from code review
bigfooted Aug 4, 2026
5648a3c
fix cfl for full multigrid
bigfooted Aug 5, 2026
08a2f02
fix cfl for full multigrid
bigfooted Aug 5, 2026
aac6802
fix cfl for full multigrid
bigfooted Aug 5, 2026
56134c5
fix cfl for full multigrid
bigfooted Aug 5, 2026
335e2c2
extra scaling for warmup phaser
bigfooted Aug 5, 2026
006ecd5
cleanup implicit lines
bigfooted Aug 5, 2026
1b84b72
cleanup implicit lines with claude
bigfooted Aug 5, 2026
2c1edf0
cleanup implicit lines with claude
bigfooted Aug 5, 2026
38b9c11
Apply suggestion from @bigfooted
bigfooted Aug 5, 2026
e9f8b7c
remove debugging output
bigfooted Aug 5, 2026
98da9bc
Merge branch 'feature_fullmg' of https://github.com/su2code/su2 into …
bigfooted Aug 5, 2026
05e68d3
remove unused variable
bigfooted Aug 5, 2026
f7677dc
Potential fix for pull request finding 'CodeQL / Comparison of narrow…
bigfooted Aug 5, 2026
ab003cb
update euler tests
bigfooted Aug 6, 2026
36a5dbd
Merge branch 'feature_fullmg' of https://github.com/su2code/su2 into …
bigfooted Aug 6, 2026
f5b52a0
fix mg update, remove linear prolongation for now
bigfooted Aug 9, 2026
6792ff7
cleanup early exit for FMG warmup phase
bigfooted Aug 9, 2026
2a9fa0d
only show mg output when mglevel>0
bigfooted Aug 9, 2026
78a4861
Merge branch 'develop' into feature_fullmg
bigfooted Aug 9, 2026
4d831a9
some small optimizations
bigfooted Aug 9, 2026
0ce67e7
freeze preconditioner, 10 percent speed gain.
bigfooted Aug 11, 2026
2c48c63
continued multigrid improvement
bigfooted Aug 14, 2026
ae01006
fix implicit lines in 3D for a large part.
bigfooted Aug 18, 2026
80f3264
Merge branch 'develop' into feature_fullmg
bigfooted Aug 19, 2026
0529c94
fix mg+mpi interface issue
bigfooted Aug 19, 2026
c9bef82
Merge branch 'feature_fullmg' of https://github.com/su2code/su2 into …
bigfooted Aug 19, 2026
a029d61
pre-commit
bigfooted Aug 19, 2026
b880efa
base implicit line agglomeration on aspect ratio
bigfooted Aug 21, 2026
7be5d3d
change parmetis anisotropy
bigfooted Aug 21, 2026
46c167e
Merge branch 'develop' into feature_fullmg
bigfooted Aug 21, 2026
192c3e1
fix some openmp stuff
bigfooted Aug 21, 2026
cf0fa01
Merge branch 'develop' into feature_fullmg
bigfooted Aug 21, 2026
f539d34
Merge branch 'develop' into feature_fullmg
bigfooted Aug 26, 2026
0e5c36f
Merge branch 'feature_fullmg' of https://github.com/su2code/su2 into …
bigfooted Aug 26, 2026
4524b30
merge with develop
bigfooted Aug 26, 2026
0931e14
cleanup
bigfooted Aug 30, 2026
5b68d2e
advancing front implicit line method
bigfooted Sep 2, 2026
513d8e8
advancing front implicit line method
bigfooted Sep 2, 2026
a9cd513
first fix mpi
bigfooted Sep 4, 2026
8303054
fix some more mpi rank and implicit line interaction
bigfooted Sep 4, 2026
c179fc9
fix 2DZP sym-wall node issue for multilevel MG
bigfooted Sep 4, 2026
55eb892
Merge branch 'develop' into feature_fullmg
bigfooted Sep 4, 2026
58f90b8
cleanup
bigfooted Sep 5, 2026
74c7497
cleanup
bigfooted Sep 5, 2026
2572fe6
precommit
bigfooted Sep 5, 2026
5eb8d9b
fix passivedouble
bigfooted Sep 6, 2026
064adf4
cleanup, remove ILU and PREC_FREEZE stuff
bigfooted Sep 6, 2026
625317b
cleanup diagnostics
bigfooted Sep 6, 2026
1251699
cleanup config option
bigfooted Sep 6, 2026
1cf2dc4
Merge branch 'develop' into feature_fullmg
bigfooted Sep 6, 2026
6008bd3
cleanup comments
bigfooted Sep 6, 2026
ccf853d
Merge branch 'develop' of https://github.com/su2code/su2 into feature…
bigfooted Sep 7, 2026
5de0a00
properly write the implicit line agglomeration info
bigfooted Sep 7, 2026
3fc6736
fix bug with cfl scaling with turbulence
bigfooted Sep 7, 2026
44bc799
Merge branch 'develop' of https://github.com/su2code/su2 into feature…
bigfooted Sep 7, 2026
945186a
Apply batched suggestions from code review
bigfooted Sep 7, 2026
0d6321c
cleanup and re-arrange, update some cfg files
bigfooted Sep 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 69 additions & 5 deletions Common/include/geometry/CMultiGridGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,16 @@ class CMultiGridGeometry final : public CGeometry {
* \return <code>TRUE</code> or <code>FALSE</code> depending if the control volume can be agglomerated.
*/
bool SetBoundAgglomeration(unsigned long CVPoint, vector<short> marker_seed, const CGeometry* fine_grid,
const CConfig* config) const;
const CConfig* config, const vector<char>& mixedBC) const;

/*!
* \brief Find nodes where two boundary conditions of different type meet. These are never
* agglomerated, since a coarse CV holding one would average both conditions.
* \param[in] fine_grid - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
* \return One flag per fine grid point, set where that point must stay on its own.
*/
vector<char> FindMixedBoundaryNodes(const CGeometry* fine_grid, const CConfig* config) const;

/*!
* \brief Determine if a Point can be agglomerated using geometrical criteria.
Expand Down Expand Up @@ -78,16 +87,71 @@ class CMultiGridGeometry final : public CGeometry {
su2double ComputeLocalCurvature(const CGeometry* fine_grid, unsigned long iPoint, unsigned short iMarker) const;

/*!
* \brief Agglomerate high-aspect-ratio interior cells along implicit lines from wall vertices.
* \brief Pave the domain with advancing fronts extruded from the boundary patches.
* \param[in,out] Index_CoarseCV - Current coarse CV index, incremented as new coarse CVs are created.
* \param[in] fine_grid - Fine grid geometry.
* \param[in] config - Configuration.
* \param[in,out] MGQueue_InnerCV - Queue for domain agglomeration; processed points are removed.
* \param[in] iMesh - Multigrid level being built, used to label the summary.
* \return Summary of the paving, empty except on the master rank.
*/
string AgglomerateImplicitLines(unsigned long& Index_CoarseCV, const CGeometry* fine_grid, const CConfig* config,
unsigned short iMesh);

/*!
* \brief Weakest and strongest dual-grid coupling at each node, and the neighbour across the
* strongest edge. Their ratio is the local cell aspect ratio, available on every MG level.
*/
struct CNodeStiffness {
vector<su2double> wMin, wMax; /*!< \brief Weakest and strongest edge coupling at each node. */
vector<unsigned long> jStiffest; /*!< \brief Neighbour across the strongest edge. */

/*!< \brief Local aspect ratio at a node, 1.0 where it could not be measured. */
su2double AspectRatio(unsigned long iPoint) const {
return (wMin[iPoint] > 0.0) ? wMax[iPoint] / wMin[iPoint] : su2double(1.0);
}
};

/*!
* \brief Measure the dual-grid coupling at every node of a grid.
* \param[in] fine_grid - Grid to measure.
* \return Weakest/strongest coupling per node.
*/
CNodeStiffness ComputeNodeStiffness(const CGeometry* fine_grid) const;

/*!
* \brief Boundary nodes that seed a front, with the direction each starts marching in.
*/
struct CFrontSeeds {
vector<unsigned long> node; /*!< \brief Seed node on the boundary. */
vector<std::array<su2double, MAXNDIM>> normal; /*!< \brief Unit normal there, pointing into the domain. */
};

/*!
* \brief Collect the boundary nodes that seed an advancing front: those on a viscous wall, or on a
* boundary carrying a stretched layer normal to itself.
* \param[in] fine_grid - Fine grid geometry.
* \param[in] config - Definition of the particular problem.
* \param[in] stiff - Node coupling from ComputeNodeStiffness.
* \return Seed nodes and their inward boundary normals.
*/
void AgglomerateImplicitLines(unsigned long& Index_CoarseCV, const CGeometry* fine_grid, const CConfig* config,
CMultiGridQueue& MGQueue_InnerCV);
CFrontSeeds SeedFrontNodes(const CGeometry* fine_grid, const CConfig* config, const CNodeStiffness& stiff) const;

/*!
* \brief Partition the seed nodes into compact surface patches by repeated pairwise matching. Each
* patch is the footprint of one front and fixes the shape of the stack above it.
* \param[in] seeds - Seed nodes from SeedFrontNodes.
* \param[in] fine_grid - Fine grid geometry.
* \param[in] config - Definition of the particular problem.
* \param[in] mixedBC - Nodes that must stay on their own, from FindMixedBoundaryNodes.
* \return One vector of indices into seeds.node per patch.
*/
vector<vector<unsigned long>> BuildFrontPatches(const CFrontSeeds& seeds, const CGeometry* fine_grid,
const CConfig* config, const vector<char>& mixedBC) const;

public:
/*!< \brief Paving summary for this level. */
string pavingReport;

/*--- This is to suppress Woverloaded-virtual, omitting it has no negative impact. ---*/
using CGeometry::SetBoundControlVolume;
using CGeometry::SetControlVolume;
Expand Down
3 changes: 1 addition & 2 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ inline SST_ParsedOptions ParseSSTOptions(const SST_OPTIONS *SST_Options, unsigne
struct CMGOptions {
su2double MG_Smooth_Res_Threshold{0.0}; /*!< \brief RMS reduction threshold for MG smoothing early exit. */
su2double MG_Smooth_Coeff{0.0}; /*!< \brief Jacobi smoother coefficient for coarse-grid correction. */
unsigned long MG_Min_MeshSize{0}; /*!< \brief Minimum CVs on coarsest MG level. */
unsigned long MG_Min_MeshSize{0}; /*!< \brief Minimum CVs on coarsest MG level, per MPI rank. */
std::vector<unsigned short> MG_PreSmooth; /*!< \brief Multigrid pre-smoothing iterations per level. */
std::vector<unsigned short> MG_PostSmooth; /*!< \brief Multigrid post-smoothing iterations per level. */
std::vector<unsigned short> MG_CorrecSmooth; /*!< \brief Multigrid Jacobi correction-smoothing per level. */
Expand All @@ -1125,7 +1125,6 @@ struct CMGOptions {
bool MG_Smooth_Output{false}; /*!< \brief Output compact per-cycle smoothing summary. */
su2double MG_Smooth_StagnationTol{0.0}; /*!< \brief Stagnation early exit: stop if current_rms >= prev_rms * tol. 0 = disabled. */
bool MG_Implicit_Lines{false}; /*!< \brief Enable implicit-lines agglomeration from walls. */
unsigned long MG_Implicit_Lines_MaxLength{20}; /*!< \brief Maximum nodes on a wall-normal implicit line (including wall seed). */
unsigned long MG_Startup_Iter{100}; /*!< \brief Iterations per mesh during FMG startup, and the length of each level's CFL ramp. 0 = no iteration budget. */
su2double MG_Startup_Convergence{-2.0}; /*!< \brief FMG: orders of magnitude (log10) that CONV_FIELD must drop on the
active level before promoting to the next finer one. Negative is a
Expand Down
11 changes: 6 additions & 5 deletions Common/src/CConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2061,16 +2061,16 @@ void CConfig::SetConfig_Options() {
addDoubleOption("MG_SMOOTH_RES_THRESHOLD", MGOptions.MG_Smooth_Res_Threshold, 0.9);
/*!\brief MG_SMOOTH_OUTPUT\n DESCRIPTION: Print compact per-cycle smoothing iteration summary. DEFAULT: NO \ingroup Config*/
addBoolOption("MG_SMOOTH_OUTPUT", MGOptions.MG_Smooth_Output, false);
/*!\brief MG_SMOOTH_STAGNATION_TOL\n DESCRIPTION: Stop smoothing if current_rms >= previous_rms * this value. Values < 1.0 enable early exit on stagnation, 1.0 only exits on defect growth. DEFAULT: 0.99 \ingroup Config*/
/*!\brief MG_SMOOTH_STAGNATION_TOL\n DESCRIPTION: Stop smoothing if current_rms >= previous_rms * this value.
* Values < 1.0 enable early exit on stagnation, 1.0 only exits on defect growth. DEFAULT: 0.99 \ingroup Config*/
addDoubleOption("MG_SMOOTH_STAGNATION_TOL", MGOptions.MG_Smooth_StagnationTol, 0.99);
/*!\brief MG_SMOOTH_COEFF\n DESCRIPTION: Smoothing coefficient for the correction prolongation Jacobi smoother. DEFAULT: 1.25 \ingroup Config*/
addDoubleOption("MG_SMOOTH_COEFF", MGOptions.MG_Smooth_Coeff, 1.25);
/*!\brief MG_MIN_MESHSIZE\n DESCRIPTION: Minimum number of CVs on the coarsest multigrid level. Levels that would produce fewer CVs are not created. DEFAULT: 50 \ingroup Config*/
/*!\brief MG_MIN_MESHSIZE\n DESCRIPTION: Minimum number of CVs on the coarsest multigrid level, checked per MPI rank
* (i.e. on the smallest partition). Levels that would produce fewer CVs on any rank are not created. DEFAULT: 500 \ingroup Config*/
addUnsignedLongOption("MG_MIN_MESHSIZE", MGOptions.MG_Min_MeshSize, 500);
/*!\brief MG_IMPLICIT_LINES\n DESCRIPTION: Enable agglomeration along implicit lines from wall seeds. DEFAULT: NO \ingroup Config*/
addBoolOption("MG_IMPLICIT_LINES", MGOptions.MG_Implicit_Lines, false);
/*!\brief MG_IMPLICIT_LINES_MAX_LENGTH\n DESCRIPTION: Maximum number of nodes on a wall-normal implicit agglomeration line (including the wall seed node). DEFAULT: 20 \ingroup Config*/
addUnsignedLongOption("MG_IMPLICIT_LINES_MAX_LENGTH", MGOptions.MG_Implicit_Lines_MaxLength, 20);
/*!\brief MG_STARTUP_ITER\n DESCRIPTION: Max number of iterations spent on each mesh during the Full
* Multigrid (FMG) startup phase. DEFAULT: 100 \ingroup Config*/
addUnsignedLongOption("MG_STARTUP_ITER", MGOptions.MG_Startup_Iter, 100);
Expand All @@ -2085,7 +2085,8 @@ void CConfig::SetConfig_Options() {
/*!\brief MG_STARTUP_STAGNATION_ITER\n DESCRIPTION: Consecutive stalled iterations required before Full-MG promotes
* on stagnation. 0 disables it, as MG_STARTUP_STAGNATION= 0 does. DEFAULT: 5 \ingroup Config*/
addUnsignedLongOption("MG_STARTUP_STAGNATION_ITER", MGOptions.MG_Startup_Stagnation_Iter, 5);
/*!\brief MG_CFL_SCALING\n DESCRIPTION: Per-level CFL scaling factors for coarse MG levels. Entry i is the ratio CFL(i+1)/CFL(i). If fewer values than nMGLevels are given, the last value is repeated. DEFAULT: 0.25 (i.e., 1/4 per level) \ingroup Config*/
/*!\brief MG_CFL_SCALING\n DESCRIPTION: Per-level CFL scaling factors for coarse MG levels. Entry i is the ratio CFL(i+1)/CFL(i).
* If fewer values than nMGLevels are given, the last value is repeated. DEFAULT: 0.25 (i.e., 1/4 per level) \ingroup Config*/
addDoubleListOption("MG_CFL_SCALING", nMG_CflScaling_p, MG_CflScaling_p);

/*!\par CONFIG_CATEGORY: Spatial Discretization \ingroup Config*/
Expand Down
Loading
Loading