Skip to content

Commit ca0b4b6

Browse files
authored
Apply suggestions from code review
1 parent b66271c commit ca0b4b6

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

Common/src/geometry/CGeometry.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4003,27 +4003,27 @@ void CGeometry::ComputeWallDistance(const CConfig* const* config_container, CGeo
40034003

40044004
/*--- For the FEM solver, we use a different mesh structure ---*/
40054005
MAIN_SOLVER kindSolver = config_container[iZone]->GetKind_Solver();
4006-
4007-
if ((wallDistanceNeeded[iZone]) && (kindSolver != MAIN_SOLVER::FEM_LES) && (kindSolver != MAIN_SOLVER::FEM_RANS)) {
4008-
const auto* config = config_container[iZone];
4009-
auto* geometry = geometry_container[iZone][iInst][MESH_0];
4010-
4011-
for (unsigned short iMarker = 0; iMarker < config->GetnMarker_All(); ++iMarker) {
4012-
const auto viscous = config->GetViscous_Wall(iMarker);
4013-
4014-
SU2_OMP_FOR_STAT(OMP_MIN_SIZE)
4015-
for (auto iVertex = 0u; iVertex < geometry->nVertex[iMarker]; iVertex++) {
4016-
const auto iPoint = geometry->vertex[iMarker][iVertex]->GetNode();
4017-
su2double dist = 0;
4018-
if (viscous && geometry->nodes->GetDomain(iPoint)) {
4019-
dist = NearestNeighborDistance(geometry, config, iPoint);
4020-
} else {
4021-
dist = geometry->nodes->GetWall_Distance(iPoint);
4022-
}
4023-
geometry->vertex[iMarker][iVertex]->SetNearestNeighborDistance(dist);
4006+
if (!wallDistanceNeeded[iZone] || kindSolver == MAIN_SOLVER::FEM_LES || kindSolver == MAIN_SOLVER::FEM_RANS) {
4007+
continue;
4008+
}
4009+
const auto* config = config_container[iZone];
4010+
auto* geometry = geometry_container[iZone][iInst][MESH_0];
4011+
4012+
for (unsigned short iMarker = 0; iMarker < config->GetnMarker_All(); ++iMarker) {
4013+
const auto viscous = config->GetViscous_Wall(iMarker);
4014+
4015+
SU2_OMP_FOR_STAT(OMP_MIN_SIZE)
4016+
for (auto iVertex = 0u; iVertex < geometry->nVertex[iMarker]; iVertex++) {
4017+
const auto iPoint = geometry->vertex[iMarker][iVertex]->GetNode();
4018+
su2double dist = 0;
4019+
if (viscous && geometry->nodes->GetDomain(iPoint)) {
4020+
dist = NearestNeighborDistance(geometry, config, iPoint);
4021+
} else {
4022+
dist = geometry->nodes->GetWall_Distance(iPoint);
40244023
}
4025-
END_SU2_OMP_FOR
4024+
geometry->vertex[iMarker][iVertex]->SetNearestNeighborDistance(dist);
40264025
}
4026+
END_SU2_OMP_FOR
40274027
}
40284028
}
40294029
}

0 commit comments

Comments
 (0)