diff --git a/src/OpenFOAM/algorithms/AABBTree/AABBTree.C b/src/OpenFOAM/algorithms/AABBTree/AABBTree.C index 8bbac68837..b6aad91f74 100644 --- a/src/OpenFOAM/algorithms/AABBTree/AABBTree.C +++ b/src/OpenFOAM/algorithms/AABBTree/AABBTree.C @@ -116,7 +116,7 @@ void Foam::AABBTree::createBoxes { if (isUsedPoint.set(pointI)) { - component.append(points[pointI][maxDir]); + component.push_back(points[pointI][maxDir]); } } } @@ -167,12 +167,12 @@ void Foam::AABBTree::createBoxes // if it crosses the bin boundaries if (addMin) { - minBinObjectIDs.append(objI); + minBinObjectIDs.push_back(objI); minBb.add(points, obj); } if (addMax) { - maxBinObjectIDs.append(objI); + maxBinObjectIDs.push_back(objI); maxBb.add(points, obj); } } @@ -209,13 +209,13 @@ void Foam::AABBTree::createBoxes { // New leaf minI = nodes.size(); - nodes.append(labelPair(-1, -1)); + nodes.emplace_back(-1, -1); } else { // Update existing leaf minI = -addressing.size() - 1; - addressing.append(minBinObjectIDs); + addressing.push_back(minBinObjectIDs); } label maxI; @@ -223,13 +223,13 @@ void Foam::AABBTree::createBoxes { // New leaf maxI = nodes.size(); - nodes.append(labelPair(-1, -1)); + nodes.emplace_back(-1, -1); } else { // Update existing leaf maxI = -addressing.size() - 1; - addressing.append(maxBinObjectIDs); + addressing.push_back(maxBinObjectIDs); } nodes(nodeI) = labelPair(minI, maxI); @@ -308,7 +308,7 @@ Foam::AABBTree::AABBTree DynamicList nodes(maxLevel); DynamicList addr(maxLevel); - nodes.append(labelPair(-1, -1)); + nodes.emplace_back(-1, -1); treeBoundBox topBb(points); topBb.inflate(0.01); @@ -356,13 +356,13 @@ Foam::AABBTree::AABBTree { if (nodes[nodeI].first() < 0) { - boundBoxes.append(bbs[nodeI].first()); - addressing.append(addr[-(nodes[nodeI].first() + 1)]); + boundBoxes.push_back(bbs[nodeI].first()); + addressing.push_back(addr[-(nodes[nodeI].first() + 1)]); } if (nodes[nodeI].second() < 0) { - boundBoxes.append(bbs[nodeI].second()); - addressing.append(addr[-(nodes[nodeI].second() + 1)]); + boundBoxes.push_back(bbs[nodeI].second()); + addressing.push_back(addr[-(nodes[nodeI].second() + 1)]); } } diff --git a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C index db767a72d1..f60afd763f 100644 --- a/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C +++ b/src/OpenFOAM/algorithms/dynamicIndexedOctree/dynamicIndexedOctree.C @@ -56,7 +56,7 @@ void Foam::dynamicIndexedOctree::divide { if (shapes_.overlaps(index, subBbs)) { - contains.append(index); + contains.push_back(index); } } } @@ -117,7 +117,7 @@ Foam::dynamicIndexedOctree::divide { // Append to contents contentIndex = contents_.size(); - contents_.append(std::move(subIndices)); + contents_.push_back(std::move(subIndices)); } nod.subNodes_[octant] = contentPlusOctant(contentIndex, octant); @@ -136,7 +136,7 @@ Foam::dynamicIndexedOctree::divide const label newNodeId = nodes_.size(); - nodes_.append(nod); + nodes_.push_back(nod); nodes_[parentNodeIndex].subNodes_[octantToBeDivided] = nodePlusOctant(newNodeId, octantToBeDivided); @@ -2463,13 +2463,12 @@ bool Foam::dynamicIndexedOctree::insert(label startIndex, label endIndex) if (nodes_.empty()) { - contents_.append(DynamicList