Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,22 @@ class CSU2ASCIIMeshReaderBase : public CMeshReaderBase {
* elements). \param[in,out] config - Problem configuration where some metadata is updated (e.g. AoA). \returns True
* if single_pass was successful.
*/
bool ReadMetadata(const bool single_pass, CConfig* config);
bool ReadMetadata(bool single_pass, CConfig* config);

/*!
* \brief Reads the grid points from an SU2 zone into linear partitions across all ranks.
*/
virtual void ReadPointCoordinates(const bool single_pass = false);
virtual void ReadPointCoordinates(bool single_pass = false);

/*!
* \brief Reads the interior volume elements from one section of an SU2 zone into linear partitions across all ranks.
*/
virtual void ReadVolumeElementConnectivity(const bool single_pass = false);
virtual void ReadVolumeElementConnectivity(bool single_pass = false);

/*!
* \brief Reads the surface (boundary) elements from the SU2 zone.
*/
virtual void ReadSurfaceElementConnectivity(const bool single_pass = false);
virtual void ReadSurfaceElementConnectivity(bool single_pass = false);

/*!
* \brief Helper function to find the current zone in an SU2 ASCII mesh object.
Expand Down
8 changes: 4 additions & 4 deletions Common/include/geometry/meshreader/CSU2ASCIIMeshReaderFEM.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@
* \brief Reads a native SU2 ASCII grid into linear partitions for the finite element solver (FEM).
* \author T. Economon, E. van der Weide
*/
class CSU2ASCIIMeshReaderFEM : public CSU2ASCIIMeshReaderBase {
class CSU2ASCIIMeshReaderFEM final : public CSU2ASCIIMeshReaderBase {
private:
/*!
* \brief Reads the grid points from an SU2 zone into linear partitions across all ranks.
*/
void ReadPointCoordinates();
void ReadPointCoordinates(bool) override;

/*!
* \brief Reads the interior volume elements from one section of an SU2 zone into linear partitions across all ranks.
*/
void ReadVolumeElementConnectivity();
void ReadVolumeElementConnectivity(bool) override;

/*!
* \brief Reads the surface (boundary) elements from one section of an SU2 zone into linear partitions across all
* ranks.
*/
void ReadSurfaceElementConnectivity();
void ReadSurfaceElementConnectivity(bool) override;

public:
/*!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* \brief Reads a native SU2 ASCII grid into linear partitions for the finite volume solver (FVM).
* \author T. Economon
*/
class CSU2ASCIIMeshReaderFVM : public CSU2ASCIIMeshReaderBase {
class CSU2ASCIIMeshReaderFVM final : public CSU2ASCIIMeshReaderBase {
private:
/*!
* \brief Splits a single surface actuator disk boundary into two separate markers (repeated points).
Expand Down
4 changes: 0 additions & 4 deletions Common/include/option_structure.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2046,10 +2046,6 @@ enum class WALL_TYPE {
SMOOTH, /*!< \brief Smooth wall */
ROUGH, /*!< \brief Rough wall */
};
static const MapType<std::string, WALL_TYPE> WallType_Map = {
MakePair("SMOOTH", WALL_TYPE::SMOOTH)
MakePair("ROUGH", WALL_TYPE::ROUGH)
};

/*!
* \brief Types of objective functions
Expand Down
12 changes: 5 additions & 7 deletions Common/src/geometry/CPhysicalGeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4482,7 +4482,7 @@ void CPhysicalGeometry::SetRCM_Ordering(CConfig* config) {
* which is equivalent to incrementing an integer marking the end of the
* result and the start of the queue. ---*/
vector<char> InQueue(nPoint, false);
vector<unsigned long> AuxQueue, Result;
vector<unsigned long> Result;
Result.reserve(nPoint);
unsigned long QueueStart = 0;

Expand Down Expand Up @@ -4521,21 +4521,19 @@ void CPhysicalGeometry::SetRCM_Ordering(CConfig* config) {

/*--- Add all adjacent nodes to the queue in increasing order of their
degree, checking if the element is already in the queue. ---*/
AuxQueue.clear();
auto currEnd = Result.end();
for (auto iNode = 0u; iNode < nodes->GetnPoint(AddPoint); iNode++) {
const auto AdjPoint = nodes->GetPoint(AddPoint, iNode);
if (!InQueue[AdjPoint]) {
AuxQueue.push_back(AdjPoint);
Result.push_back(AdjPoint);
InQueue[AdjPoint] = true;
}
}
if (AuxQueue.empty()) continue;

/*--- Sort the auxiliar queue based on the number of neighbors (degree). ---*/
stable_sort(AuxQueue.begin(), AuxQueue.end(), [&](unsigned long iPoint, unsigned long jPoint) {
/*--- Sort the new points based on the number of neighbors (degree). ---*/
stable_sort(currEnd, Result.end(), [&](unsigned long iPoint, unsigned long jPoint) {
return nodes->GetnPoint(iPoint) < nodes->GetnPoint(jPoint);
});
Result.insert(Result.end(), AuxQueue.begin(), AuxQueue.end());
}
}
reverse(Result.begin(), Result.end());
Expand Down
12 changes: 6 additions & 6 deletions Common/src/geometry/meshreader/CSU2ASCIIMeshReaderFEM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ CSU2ASCIIMeshReaderFEM::CSU2ASCIIMeshReaderFEM(CConfig* val_config, unsigned sho

/*--- Read the volume connectivity and distribute it
linearly over the MPI ranks. ---*/
ReadVolumeElementConnectivity();
ReadVolumeElementConnectivity({});

/*--- Read the coordinates of the points that are needed
on this MPI rank. ---*/
ReadPointCoordinates();
ReadPointCoordinates({});

/*--- Read the surface connectivity and store the surface elements whose
corresponding volume element is stored on this MPI rank. ---*/
ReadSurfaceElementConnectivity();
ReadSurfaceElementConnectivity({});
}

CSU2ASCIIMeshReaderFEM::~CSU2ASCIIMeshReaderFEM() = default;

void CSU2ASCIIMeshReaderFEM::ReadPointCoordinates() {
void CSU2ASCIIMeshReaderFEM::ReadPointCoordinates(bool) {
/*--- Loop over the local elements to determine the global
point IDs to be stored on this rank. --*/
unsigned long ind = 0;
Expand Down Expand Up @@ -113,7 +113,7 @@ void CSU2ASCIIMeshReaderFEM::ReadPointCoordinates() {
mesh_file.close();
}

void CSU2ASCIIMeshReaderFEM::ReadVolumeElementConnectivity() {
void CSU2ASCIIMeshReaderFEM::ReadVolumeElementConnectivity(bool) {
/* Get a partitioner to help with linear partitioning. */
CLinearPartitioner elemPartitioner(numberOfGlobalElements, 0);

Expand Down Expand Up @@ -213,7 +213,7 @@ void CSU2ASCIIMeshReaderFEM::ReadVolumeElementConnectivity() {
mesh_file.close();
}

void CSU2ASCIIMeshReaderFEM::ReadSurfaceElementConnectivity() {
void CSU2ASCIIMeshReaderFEM::ReadSurfaceElementConnectivity(bool) {
/*--- Determine the vector to hold the faces of the local elements. ---*/
vector<CFaceOfElement> localFaces;
DetermineFacesVolumeElements(localFaces);
Expand Down
4 changes: 3 additions & 1 deletion SU2_CFD/src/solvers/CFEM_DG_EulerSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ void CFEM_DG_EulerSolver::SetNondimensionalization(CConfig *config,
ModVel_FreeStreamND = sqrt(ModVel_FreeStreamND); config->SetModVel_FreeStreamND(ModVel_FreeStreamND);

Viscosity_FreeStreamND = Viscosity_FreeStream / Viscosity_Ref; config->SetViscosity_FreeStreamND(Viscosity_FreeStreamND);
Thermal_Conductivity_FreeStreamND = Thermal_Conductivity_FreeStream / Conductivity_Ref;
Thermal_Conductivity_FreeStreamND = Thermal_Conductivity_FreeStream / Conductivity_Ref;
config->SetThermalConductivity_FreeStreamND(Thermal_Conductivity_FreeStreamND);
SpecificHeat_Cp_FreeStreamND = SpecificHeat_Cp_FreeStream / Gas_Constant_Ref;
config->SetSpecificHeatCp_FreeStreamND(SpecificHeat_Cp_FreeStreamND);
Expand Down Expand Up @@ -9457,6 +9457,8 @@ void CFEM_DG_EulerSolver::ComputeInviscidFluxesFace(CConfig *config
numerics->ComputeResidual(flux, Jacobian_i, Jacobian_j, config);
}
}
/*--- Just to avoid compilers complaining about dangling pointers. ---*/
numerics->SetPrimitive(nullptr, nullptr);

for (unsigned short iVar = 0; iVar < nVar; iVar++) {
delete [] Jacobian_i[iVar];
Expand Down
2 changes: 1 addition & 1 deletion SU2_CFD/src/solvers/CTurbSSTSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ void CTurbSSTSolver::BC_HeatFlux_Wall(CGeometry *geometry, CSolver **solver_cont
string Marker_Tag = config->GetMarker_All_TagBound(val_marker);
WALL_TYPE WallType; su2double Roughness_Height;
tie(WallType, Roughness_Height) = config->GetWallRoughnessProperties(Marker_Tag);
const bool rough_wall = WallType == WALL_TYPE::ROUGH && Roughness_Height > 0;
const bool rough_wall = WallType == WALL_TYPE::ROUGH;

/*--- Evaluate nu tilde at the closest point to the surface using the wall functions. ---*/

Expand Down
2 changes: 1 addition & 1 deletion config_template.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ MARKER_DISPLACEMENT= ( NONE )

% ------------------------ WALL ROUGHNESS DEFINITION --------------------------%
% The equivalent sand grain roughness height (k_s) on each of the wall. This must be in m.
% This is a list of (string, double) each element corresponding to the MARKER defined in WALL_TYPE.
% This is a list of (string, double) each element corresponding to a wall marker.
WALL_ROUGHNESS = (wall1, ks1, wall2, ks2)
%WALL_ROUGHNESS = (wall1, ks1, wall2, 0.0) %is also allowed
%
Expand Down