Skip to content

Commit dc65cd8

Browse files
author
rois1995
committed
- revert changes and put fix in the NearestNeighborDistance
1 parent 1df8313 commit dc65cd8

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

Common/src/geometry/CGeometry.cpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4074,7 +4074,8 @@ su2double NearestNeighborDistance(CGeometry* geometry, const CConfig* config, co
40744074
const su2double max = std::numeric_limits<su2double>::max();
40754075
su2double distance = max;
40764076
for (const auto jPoint : geometry->nodes->GetPoints(iPoint)) {
4077-
const su2double dist = geometry->nodes->GetWall_Distance(jPoint);
4077+
const su2double dist =
4078+
geometry->nodes->GetViscousBoundary(jPoint) ? 0.0 : geometry->nodes->GetWall_Distance(jPoint);
40784079
if (dist > EPS) distance = fmin(distance, dist);
40794080
}
40804081
if (distance > 0 && distance < max) return distance;
@@ -4119,20 +4120,7 @@ void CGeometry::ComputeWallDistance(const CConfig* const* config_container, CGeo
41194120
* This is necessary, because before a computed distance is set, it will be checked
41204121
* whether the new distance is smaller than the currently stored one. ---*/
41214122
CGeometry* geometry = geometry_container[iZone][iInst][MESH_0];
4122-
if (wallDistanceNeeded[iZone]) {
4123-
geometry->SetWallDistance(numeric_limits<su2double>::max());
4124-
4125-
for (auto iMarker = 0; iMarker < config_container[iZone]->GetnMarker_All(); iMarker++) {
4126-
if (!config_container[iZone]->GetViscous_Wall(iMarker)) continue;
4127-
4128-
SU2_OMP_FOR_STAT(OMP_MIN_SIZE)
4129-
for (auto iVertex = 0u; iVertex < geometry->nVertex[iMarker]; iVertex++) {
4130-
const auto iPoint = geometry->vertex[iMarker][iVertex]->GetNode();
4131-
geometry->SetWallDistance(iPoint, 0.0);
4132-
}
4133-
END_SU2_OMP_FOR
4134-
}
4135-
}
4123+
if (wallDistanceNeeded[iZone]) geometry->SetWallDistance(numeric_limits<su2double>::max());
41364124
}
41374125

41384126
/*--- Loop over all zones and compute the ADT based on the viscous walls in that zone ---*/

Common/src/geometry/CPhysicalGeometry.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10559,9 +10559,7 @@ void CPhysicalGeometry::SetWallDistance(CADTElemClass* WallADT, const CConfig* c
1055910559

1056010560
WallADT->DetermineNearestElement(nodes->GetCoord(iPoint), dist, markerID, elemID, rankID);
1056110561

10562-
if (nodes->GetWall_Distance(iPoint) == 0) dist = 0;
10563-
10564-
if (dist < nodes->GetWall_Distance(iPoint) || dist == 0) {
10562+
if (dist < nodes->GetWall_Distance(iPoint)) {
1056510563
nodes->SetWall_Distance(iPoint, dist, rankID, iZone, markerID, elemID);
1056610564
}
1056710565
}

0 commit comments

Comments
 (0)