diff --git a/Common/include/CConfig.hpp b/Common/include/CConfig.hpp
index dc96c21ad3b..b15c00e333b 100644
--- a/Common/include/CConfig.hpp
+++ b/Common/include/CConfig.hpp
@@ -488,7 +488,7 @@ class CConfig {
unsigned short **DegreeFFDBox; /*!< \brief Degree of the FFD boxes. */
string *FFDTag; /*!< \brief Parameters of the design variable. */
string *TagFFDBox; /*!< \brief Tag of the FFD box. */
- unsigned short GeometryMode; /*!< \brief Gemoetry mode (analysis or gradient computation). */
+ unsigned short GeometryMode; /*!< \brief Geometry mode (analysis or gradient computation). */
unsigned short MGCycle; /*!< \brief Kind of multigrid cycle. */
unsigned short FinestMesh; /*!< \brief Finest mesh for the full multigrid approach. */
unsigned short nFFD_Fix_IDir,
@@ -2912,7 +2912,7 @@ class CConfig {
unsigned short GetFinestMesh(void) const { return FinestMesh; }
/*!
- * \brief Get the kind of multigrid (V or W).
+ * \brief Get the kind of multigrid (V, W or FULLMG).
* \note This variable is used in a recursive way to perform the different kind of cycles
* \return 0 or 1 depending of we are dealing with a V or W cycle.
*/
diff --git a/Common/include/geometry/CMultiGridGeometry.hpp b/Common/include/geometry/CMultiGridGeometry.hpp
index 00faa8126c6..692a85360d4 100644
--- a/Common/include/geometry/CMultiGridGeometry.hpp
+++ b/Common/include/geometry/CMultiGridGeometry.hpp
@@ -28,28 +28,29 @@
#pragma once
#include "CGeometry.hpp"
+class CMultiGridQueue;
/*!
* \class CMultiGridGeometry
- * \brief Class for defining the multigrid geometry, the main delicated part is the
+ * \brief Class for defining the multigrid geometry, the main delegated part is the
* agglomeration stage, which is done in the declaration.
* \author F. Palacios
*/
class CMultiGridGeometry final : public CGeometry {
private:
/*!
- * \brief Determine if a CVPoint van be agglomerated, if it have the same marker point as the seed.
+ * \brief Determine if a CVPoint can be agglomerated, if it has the same marker point as the seed.
* \param[in] CVPoint - Control volume to be agglomerated.
* \param[in] marker_seed - Marker of the seed.
* \param[in] fine_grid - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
* \return TRUE or FALSE depending if the control volume can be agglomerated.
*/
- bool SetBoundAgglomeration(unsigned long CVPoint, short marker_seed, const CGeometry* fine_grid,
+ bool SetBoundAgglomeration(unsigned long CVPoint, vector marker_seed, const CGeometry* fine_grid,
const CConfig* config) const;
/*!
- * \brief Determine if a can be agglomerated using geometrical criteria.
+ * \brief Determine if a Point can be agglomerated using geometrical criteria.
* \param[in] iPoint - Seed point.
* \param[in] fine_grid - Geometrical definition of the problem.
* \param[in] config - Definition of the particular problem.
@@ -57,7 +58,7 @@ class CMultiGridGeometry final : public CGeometry {
bool GeometricalCheck(unsigned long iPoint, const CGeometry* fine_grid, const CConfig* config) const;
/*!
- * \brief Determine if a CVPoint van be agglomerated, if it have the same marker point as the seed.
+ * \brief Determine if a CVPoint can be agglomerated, if it has the same marker point as the seed.
* \param[out] Suitable_Indirect_Neighbors - List of Indirect Neighbours that can be agglomerated.
* \param[in] iPoint - Seed point.
* \param[in] Index_CoarseCV - Index of agglomerated point.
@@ -66,6 +67,21 @@ class CMultiGridGeometry final : public CGeometry {
void SetSuitableNeighbors(vector& Suitable_Indirect_Neighbors, unsigned long iPoint,
unsigned long Index_CoarseCV, const CGeometry* fine_grid) const;
+ /*!
+ * \brief Compute surface straightness for multigrid geometry.
+ * \param[in] config - Definition of the particular problem.
+ */
+ void ComputeSurfStraightness(CConfig* config);
+
+ /*!
+ * \brief Compute local curvature at a boundary vertex on Euler wall.
+ * \param[in] fine_grid - Fine grid geometry.
+ * \param[in] iPoint - Point index.
+ * \param[in] iMarker - Marker index.
+ * \return Maximum angle (in degrees) between this vertex normal and adjacent vertex normals.
+ */
+ su2double ComputeLocalCurvature(const CGeometry* fine_grid, unsigned long iPoint, unsigned short iMarker) const;
+
public:
/*--- This is to suppress Woverloaded-virtual, omitting it has no negative impact. ---*/
using CGeometry::SetBoundControlVolume;
diff --git a/Common/include/geometry/CMultiGridQueue.hpp b/Common/include/geometry/CMultiGridQueue.hpp
index 296d4e8f73d..c16e23520e4 100644
--- a/Common/include/geometry/CMultiGridQueue.hpp
+++ b/Common/include/geometry/CMultiGridQueue.hpp
@@ -93,7 +93,7 @@ class CMultiGridQueue {
void IncrPriorityCV(unsigned long incrPoint);
/*!
- * \brief Increase the priority of the CV.
+ * \brief Reduce the priority of the CV.
* \param[in] redPoint - Index of the control volume.
*/
void RedPriorityCV(unsigned long redPoint);
diff --git a/Common/src/geometry/CGeometry.cpp b/Common/src/geometry/CGeometry.cpp
index db26d86930a..68bab580fe1 100644
--- a/Common/src/geometry/CGeometry.cpp
+++ b/Common/src/geometry/CGeometry.cpp
@@ -2591,16 +2591,14 @@ void CGeometry::ComputeSurfStraightness(const CConfig* config, bool print_on_scr
string Local_TagBound, Global_TagBound;
vector Normal(nDim), UnitNormal(nDim), RefUnitNormal(nDim);
-
/*--- Assume now that this boundary marker is straight. As soon as one
- AreaElement is found that is not aligend with a Reference then it is
- certain that the boundary marker is not straight and one can stop
- searching. Another possibility is that this process doesn't own
+ AreaElement is found that is not aligned with a Reference then it
+ is certain that the boundary marker is not straight and one can
+ stop searching. Another possibility is that this process doesn't own
any nodes of that boundary, in that case we also have to assume the
- boundary is straight.
- Any boundary type other than SYMMETRY_PLANE or EULER_WALL gets
- the value false (or see cases specified in the conditional below)
- which could be wrong. ---*/
+ boundary is straight. Any boundary type other than SYMMETRY_PLANE or
+ EULER_WALL gets the value false (or see cases specified in the
+ conditional below) which could be wrong. ---*/
boundIsStraight.resize(nMarker);
fill(boundIsStraight.begin(), boundIsStraight.end(), true);
@@ -3902,11 +3900,13 @@ void CGeometry::ColorMGLevels(unsigned short nMGLevels, const CGeometry* const*
for (auto step = 0u; step < iMesh; ++step) {
auto coarseMesh = geometry[iMesh - 1 - step];
if (step)
- for (auto iPoint = 0ul; iPoint < coarseMesh->GetnPoint(); ++iPoint)
+ for (auto iPoint = 0ul; iPoint < coarseMesh->GetnPoint(); ++iPoint) {
CoarseGridColor_(iPoint, step) = CoarseGridColor_(coarseMesh->nodes->GetParent_CV(iPoint), step - 1);
+ }
else
- for (auto iPoint = 0ul; iPoint < coarseMesh->GetnPoint(); ++iPoint)
+ for (auto iPoint = 0ul; iPoint < coarseMesh->GetnPoint(); ++iPoint) {
CoarseGridColor_(iPoint, step) = color[coarseMesh->nodes->GetParent_CV(iPoint)];
+ }
}
}
}
diff --git a/Common/src/geometry/CMultiGridGeometry.cpp b/Common/src/geometry/CMultiGridGeometry.cpp
index a52d111237c..1fccf3fd240 100644
--- a/Common/src/geometry/CMultiGridGeometry.cpp
+++ b/Common/src/geometry/CMultiGridGeometry.cpp
@@ -29,20 +29,36 @@
#include "../../include/geometry/CMultiGridQueue.hpp"
#include "../../include/toolboxes/printing_toolbox.hpp"
#include "../../../Common/include/toolboxes/geometry_toolbox.hpp"
+#include
+#include
+#include
+#include
+#include
+#include
+#include