@@ -4000,24 +4000,26 @@ void CGeometry::ComputeWallDistance(const CConfig* const* config_container, CGeo
40004000 }
40014001
40024002 for (int iZone = 0 ; iZone < nZone; iZone++) {
4003- const auto * config = config_container[iZone];
4004- auto * geometry = geometry_container[iZone][iInst][MESH_0];
4005-
4006- for (unsigned short iMarker = 0 ; iMarker < config->GetnMarker_All (); ++iMarker) {
4007- const auto viscous = config->GetViscous_Wall (iMarker);
4008-
4009- SU2_OMP_FOR_STAT (OMP_MIN_SIZE)
4010- for (auto iVertex = 0u ; iVertex < geometry->nVertex [iMarker]; iVertex++) {
4011- const auto iPoint = geometry->vertex [iMarker][iVertex]->GetNode ();
4012- su2double dist = 0 ;
4013- if (viscous && geometry->nodes ->GetDomain (iPoint)) {
4014- dist = NearestNeighborDistance (geometry, config, iPoint);
4015- } else {
4016- dist = geometry->nodes ->GetWall_Distance (iPoint);
4003+ if (wallDistanceNeeded[iZone]) {
4004+ const auto * config = config_container[iZone];
4005+ auto * geometry = geometry_container[iZone][iInst][MESH_0];
4006+
4007+ for (unsigned short iMarker = 0 ; iMarker < config->GetnMarker_All (); ++iMarker) {
4008+ const auto viscous = config->GetViscous_Wall (iMarker);
4009+
4010+ SU2_OMP_FOR_STAT (OMP_MIN_SIZE)
4011+ for (auto iVertex = 0u ; iVertex < geometry->nVertex [iMarker]; iVertex++) {
4012+ const auto iPoint = geometry->vertex [iMarker][iVertex]->GetNode ();
4013+ su2double dist = 0 ;
4014+ if (viscous && geometry->nodes ->GetDomain (iPoint)) {
4015+ dist = NearestNeighborDistance (geometry, config, iPoint);
4016+ } else {
4017+ dist = geometry->nodes ->GetWall_Distance (iPoint);
4018+ }
4019+ geometry->vertex [iMarker][iVertex]->SetNearestNeighborDistance (dist);
40174020 }
4018- geometry-> vertex [iMarker][iVertex]-> SetNearestNeighborDistance (dist);
4021+ END_SU2_OMP_FOR
40194022 }
4020- END_SU2_OMP_FOR
40214023 }
40224024 }
40234025 }
0 commit comments