diff --git a/src/OpenFOAM/meshes/bandCompression/bandCompression.C b/src/OpenFOAM/meshes/bandCompression/bandCompression.C index 6e43453ffb..428421d4c0 100644 --- a/src/OpenFOAM/meshes/bandCompression/bandCompression.C +++ b/src/OpenFOAM/meshes/bandCompression/bandCompression.C @@ -99,7 +99,7 @@ Foam::labelList cuthill_mckee_algorithm // Starting from currCelli - walk breadth-first - queuedCells.append(currCelli); + queuedCells.push_back(currCelli); // Loop through queuedCells list. Add the first cell into the // cell order if it has not already been visited and ask for its @@ -109,7 +109,7 @@ Foam::labelList cuthill_mckee_algorithm while (!queuedCells.empty()) { // Process as FIFO - currCelli = queuedCells.first(); + currCelli = queuedCells.front(); queuedCells.pop_front(); if (unvisited.test(currCelli)) @@ -151,7 +151,7 @@ Foam::labelList cuthill_mckee_algorithm // 3. Add to FIFO in sorted order for (const label nbrIdx : nbrOrder) { - queuedCells.append(nbrCells[nbrIdx]); + queuedCells.push_back(nbrCells[nbrIdx]); } } } @@ -240,7 +240,7 @@ Foam::labelList Foam::meshTools::bandCompression // Starting from currCellii - walk breadth-first - queuedCells.append(currCelli); + queuedCells.push_back(currCelli); // loop through the nextCell list. Add the first cell into the // cell order if it has not already been visited and ask for its @@ -255,7 +255,7 @@ Foam::labelList Foam::meshTools::bandCompression while (!queuedCells.empty()) { // Process as FIFO - currCelli = queuedCells.first(); + currCelli = queuedCells.front(); queuedCells.pop_front(); if (unvisited.test(currCelli)) @@ -298,7 +298,7 @@ Foam::labelList Foam::meshTools::bandCompression // 3. Add to FIFO in sorted order for (const label nbrIdx : nbrOrder) { - queuedCells.append(nbrCells[nbrIdx]); + queuedCells.push_back(nbrCells[nbrIdx]); } } } diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchLocalPointOrder.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchLocalPointOrder.C index d687718b92..539c7a7245 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchLocalPointOrder.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchLocalPointOrder.C @@ -29,8 +29,8 @@ Description \*---------------------------------------------------------------------------*/ -#include "SLList.H" #include "boolList.H" +#include "CircularBuffer.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -55,58 +55,57 @@ Foam::PrimitivePatch::calcLocalPointOrder() const const labelListList& ff = faceFaces(); - boolList visitedFace(lf.size(), false); - localPointOrderPtr_.reset(new labelList(meshPoints().size(), -1)); auto& pointOrder = *localPointOrderPtr_; + boolList visitedFace(lf.size(), false); boolList visitedPoint(pointOrder.size(), false); label nPoints = 0; + // FIFO buffer managing point/face insertion order + CircularBuffer