@@ -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 ---*/
0 commit comments