Skip to content

Commit 2b38eb2

Browse files
committed
fix
1 parent 3c875ab commit 2b38eb2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Common/src/geometry/CPhysicalGeometry.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4521,6 +4521,7 @@ void CPhysicalGeometry::SetRCM_Ordering(CConfig* config) {
45214521

45224522
/*--- Add all adjacent nodes to the queue in increasing order of their
45234523
degree, checking if the element is already in the queue. ---*/
4524+
auto currEnd = Result.end();
45244525
for (auto iNode = 0u; iNode < nodes->GetnPoint(AddPoint); iNode++) {
45254526
const auto AdjPoint = nodes->GetPoint(AddPoint, iNode);
45264527
if (!InQueue[AdjPoint]) {
@@ -4530,7 +4531,7 @@ void CPhysicalGeometry::SetRCM_Ordering(CConfig* config) {
45304531
}
45314532

45324533
/*--- Sort the new points based on the number of neighbors (degree). ---*/
4533-
stable_sort(Result.begin() + QueueStart, Result.end(), [&](unsigned long iPoint, unsigned long jPoint) {
4534+
stable_sort(currEnd, Result.end(), [&](unsigned long iPoint, unsigned long jPoint) {
45344535
return nodes->GetnPoint(iPoint) < nodes->GetnPoint(jPoint);
45354536
});
45364537
}

0 commit comments

Comments
 (0)