Skip to content

Commit 765ef21

Browse files
committed
small clean up
1 parent 7c7aa1c commit 765ef21

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

Common/src/geometry/CGeometry.cpp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2472,10 +2472,7 @@ void CGeometry::ComputeModifiedSymmetryNormals(const CConfig* config) {
24722472
}
24732473
}
24742474

2475-
// first check Euler walls, we 'merge' all curver euler walls with other curved euler walls
2476-
2477-
/*--- Loop over all markers and find nodes on symmetry planes that are shared with other symmetries. ---*/
2478-
/*--- The first symmetry does not need a corrected normal vector, hence start at 1. ---*/
2475+
/*--- Loop over all markers and find nodes shared on curved symmetry/Euler markers. ---*/
24792476
for (size_t i = 1; i < symMarkers.size(); ++i) {
24802477
const auto iMarker = symMarkers[i];
24812478
for (auto iVertex = 0ul; iVertex < nVertex[iMarker]; iVertex++) {
@@ -2492,22 +2489,15 @@ void CGeometry::ComputeModifiedSymmetryNormals(const CConfig* config) {
24922489
for (auto iDim = 0u; iDim < nDim; iDim++) iNormal[iDim] /= iarea;
24932490

24942491
/*--- Loop over previous symmetries and if this point shares them, sum the normals. ---*/
2495-
bool isShared = false;
2496-
24972492
for (size_t j = 0; j < i; ++j) {
24982493
const auto jMarker = symMarkers[j];
24992494
const auto jVertex = nodes->GetVertex(iPoint, jMarker);
25002495
if (jVertex < 0) continue;
25012496

2502-
/*--- If both symmetries are curved, we sum the normals. ---*/
2503-
if ((bound_is_straight[iMarker]) == false && (bound_is_straight[jMarker]) == false) {
2504-
isShared = true;
2505-
}
2506-
2507-
if (!isShared) continue;
2497+
/*--- If both symmetries are curved, we sum the normals, else continue the search. ---*/
2498+
if ((bound_is_straight[iMarker] == true) || (bound_is_straight[jMarker] == true)) continue;
25082499

25092500
std::array<su2double, MAXNDIM> jNormal = {};
2510-
// check if jvertex is already in symmetrynormals array
25112501
const auto it = symmetryNormals[jMarker].find(jVertex);
25122502

25132503
if (it != symmetryNormals[jMarker].end()) {
@@ -2518,7 +2508,7 @@ void CGeometry::ComputeModifiedSymmetryNormals(const CConfig* config) {
25182508
for (auto iDim = 0u; iDim < nDim; iDim++) jNormal[iDim] /= jarea;
25192509
}
25202510

2521-
// averaging
2511+
/*--- Average the normals on the shared nodes. Also normalize them again. ---*/
25222512
for (auto iDim = 0u; iDim < nDim; iDim++) kNormal[iDim] = iNormal[iDim] + jNormal[iDim];
25232513
const su2double karea = GeometryToolbox::Norm(nDim, kNormal.data());
25242514
for (auto iDim = 0u; iDim < nDim; iDim++) kNormal[iDim] /= karea;

0 commit comments

Comments
 (0)