Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions Common/include/CConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
*/
Expand Down
26 changes: 21 additions & 5 deletions Common/include/geometry/CMultiGridGeometry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,37 @@
#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 <code>TRUE</code> or <code>FALSE</code> 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<short> 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.
*/
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.
Expand All @@ -66,6 +67,21 @@ class CMultiGridGeometry final : public CGeometry {
void SetSuitableNeighbors(vector<unsigned long>& 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;
Expand Down
2 changes: 1 addition & 1 deletion Common/include/geometry/CMultiGridQueue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
20 changes: 10 additions & 10 deletions Common/src/geometry/CGeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2591,16 +2591,14 @@ void CGeometry::ComputeSurfStraightness(const CConfig* config, bool print_on_scr
string Local_TagBound, Global_TagBound;

vector<su2double> 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);

Expand Down Expand Up @@ -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)];
}
}
}
}
Expand Down
Loading