mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: consistency of HashSet setMany(), insertMany() with packed-list version
- this also provides a better separation of the intent (ie, inserting a single value, or inserting multiply values)
This commit is contained in:
@ -300,10 +300,7 @@ void Foam::cellClassification::markCells
|
||||
|
||||
// Mark faces of celli
|
||||
const labelList& myFaces = mesh_.cells()[celli];
|
||||
forAll(myFaces, myFacei)
|
||||
{
|
||||
outsideFacesMap.insert(myFaces[myFacei]);
|
||||
}
|
||||
outsideFacesMap.insertMany(myFaces);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -172,11 +172,7 @@ Foam::label Foam::cellDistFuncs::getPointNeighbours
|
||||
forAll(f, fp)
|
||||
{
|
||||
const labelList& pointNbs = patch.pointFaces()[f[fp]];
|
||||
|
||||
forAll(pointNbs, i)
|
||||
{
|
||||
nbs.insert(pointNbs[i]);
|
||||
}
|
||||
nbs.insertMany(pointNbs);
|
||||
}
|
||||
|
||||
// Subtract ours.
|
||||
|
||||
@ -301,11 +301,7 @@ void Foam::meshTools::writeOBJ
|
||||
forAll(cellLabels, i)
|
||||
{
|
||||
const cell& cFaces = cells[cellLabels[i]];
|
||||
|
||||
forAll(cFaces, j)
|
||||
{
|
||||
usedFaces.insert(cFaces[j]);
|
||||
}
|
||||
usedFaces.insertMany(cFaces);
|
||||
}
|
||||
|
||||
writeOBJ(os, faces, points, usedFaces.toc());
|
||||
|
||||
@ -160,10 +160,7 @@ void Foam::normalToFace::applyToSet
|
||||
}
|
||||
}
|
||||
|
||||
forAll(toBeRemoved, i)
|
||||
{
|
||||
set.erase(toBeRemoved[i]);
|
||||
}
|
||||
set.eraseMany(toBeRemoved);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -384,11 +384,7 @@ Foam::labelHashSet Foam::triSurfaceTools::getCollapsedFaces
|
||||
const labelList& myFaces = surf.edgeFaces()[edgeI];
|
||||
|
||||
labelHashSet facesToBeCollapsed(2*myFaces.size());
|
||||
|
||||
forAll(myFaces, myFacei)
|
||||
{
|
||||
facesToBeCollapsed.insert(myFaces[myFacei]);
|
||||
}
|
||||
facesToBeCollapsed.insertMany(myFaces);
|
||||
|
||||
// From faces using v1 check if they share an edge with faces
|
||||
// using v2.
|
||||
|
||||
Reference in New Issue
Block a user